Skip to content

Commit b586976

Browse files
committed
CS: Convert everything to short array notation
1 parent ee319e8 commit b586976

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/Handler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ protected function getInitial() {
322322
*/
323323
protected function getNamedOptionList($optionName, $defaultFn) {
324324
$options = $this->getOptions($this->composer);
325-
$result = array();
325+
$result = [];
326326
if (empty($options['omit-defaults'])) {
327327
$result = $this->$defaultFn();
328328
}

src/Plugin.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ public function activate(Composer $composer, IOInterface $io) {
3939
* {@inheritdoc}
4040
*/
4141
public function getCapabilities() {
42-
return array(
42+
return [
4343
'Composer\Plugin\Capability\CommandProvider' => 'DrupalComposer\DrupalScaffold\CommandProvider',
44-
);
44+
];
4545
}
4646

4747
/**
4848
* {@inheritdoc}
4949
*/
5050
public static function getSubscribedEvents() {
51-
return array(
51+
return [
5252
PackageEvents::POST_PACKAGE_INSTALL => 'postPackage',
5353
PackageEvents::POST_PACKAGE_UPDATE => 'postPackage',
5454
ScriptEvents::POST_UPDATE_CMD => 'postCmd',
5555
PluginEvents::COMMAND => 'cmdBegins',
56-
);
56+
];
5757
}
5858

5959
/**

tests/PluginTest.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -136,20 +136,20 @@ protected function writeTestReleaseTag() {
136136
* @return array
137137
*/
138138
protected function composerJSONDefaults() {
139-
return array(
140-
'repositories' => array(
141-
array(
139+
return [
140+
'repositories' => [
141+
[
142142
'type' => 'vcs',
143143
'url' => $this->rootDir,
144-
),
145-
),
146-
'require' => array(
144+
],
145+
],
146+
'require' => [
147147
'drupal-composer/drupal-scaffold' => $this->tmpReleaseTag,
148148
'composer/installers' => '^1.0.20',
149149
'drupal/core' => '8.0.0',
150-
),
150+
],
151151
'minimum-stability' => 'dev',
152-
);
152+
];
153153
}
154154

155155
/**

0 commit comments

Comments
 (0)