Completed
Pull Request — master (#924)
by Greg
02:14
created
src/Task/Composer/RequireDependency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
         if (isset($version)) {
30 30
             $project = array_map(
31
-                function ($item) use ($version) {
31
+                function($item) use ($version) {
32 32
                     return "$item:$version";
33 33
                 },
34 34
                 $project
Please login to merge, or discard this patch.
src/Task/Development/SemVer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
         }
236 236
 
237 237
         $this->version = array_intersect_key($matches, $this->version);
238
-        $this->version = array_map(function ($item) {
238
+        $this->version = array_map(function($item) {
239 239
             return $item[0];
240 240
         }, $this->version);
241 241
     }
Please login to merge, or discard this patch.
src/Common/ConfigAwareTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,9 +73,9 @@
 block discarded – undo
73 73
      */
74 74
     private static function getClassKey($key)
75 75
     {
76
-        $configPrefix = static::configPrefix();                            // task.
77
-        $configClass = static::configClassIdentifier(get_called_class());  // PARTIAL_NAMESPACE.CLASSNAME
78
-        $configPostFix = static::configPostfix();                          // .settings
76
+        $configPrefix = static::configPrefix(); // task.
77
+        $configClass = static::configClassIdentifier(get_called_class()); // PARTIAL_NAMESPACE.CLASSNAME
78
+        $configPostFix = static::configPostfix(); // .settings
79 79
 
80 80
         return sprintf('%s%s%s.%s', $configPrefix, $configClass, $configPostFix, $key);
81 81
     }
Please login to merge, or discard this patch.
examples/src/Robo/Plugin/Commands/ExampleCommands.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function tryWatch()
31 31
     {
32
-        $this->taskWatch()->monitor(['composer.json', 'composer.lock'], function () {
32
+        $this->taskWatch()->monitor(['composer.json', 'composer.lock'], function() {
33 33
             $this->taskComposerUpdate()->run();
34 34
         })->run();
35 35
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $this->say('The <b>expression</b> <bogus>is</bogus> <info>a < b</> it even works');
43 43
         $answer = $this->ask('how are you?');
44
-        $this->say('You are '.$answer);
44
+        $this->say('You are ' . $answer);
45 45
         $yes = $this->confirm('Do you want one more question?');
46 46
         if (!$yes) {
47 47
             return Result::cancelled();
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $lang = $this->askDefault('what is your favorite scripting language?', 'PHP');
50 50
         $this->say($lang);
51 51
         $pin = $this->askHidden('Ok, now tell your PIN code (it is hidden)');
52
-        $this->yell('Ha-ha, your pin code is: '.$pin);
52
+        $this->yell('Ha-ha, your pin code is: ' . $pin);
53 53
         $this->say('Bye!');
54 54
     }
55 55
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         // using yaml or json output formats.
174 174
         $data->addRendererFunction(
175 175
             // n.b. There is a fourth parameter $rowData that may be added here.
176
-            function ($key, $cellData, FormatterOptions $options) {
176
+            function($key, $cellData, FormatterOptions $options) {
177 177
                 if ($key == 'name') {
178 178
                     return "<info>$cellData</>";
179 179
                 }
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
     public function tryFormatters($somthing = 'default', $options = ['format' => 'table', 'fields' => ''])
204 204
     {
205 205
         $outputData = [
206
-            'en' => [ 'first' => 'One',  'second' => 'Two',  'third' => 'Three' ],
207
-            'de' => [ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei'  ],
208
-            'jp' => [ 'first' => 'Ichi', 'second' => 'Ni',   'third' => 'San'   ],
209
-            'es' => [ 'first' => 'Uno',  'second' => 'Dos',  'third' => 'Tres'  ],
206
+            'en' => ['first' => 'One', 'second' => 'Two', 'third' => 'Three'],
207
+            'de' => ['first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei'],
208
+            'jp' => ['first' => 'Ichi', 'second' => 'Ni', 'third' => 'San'],
209
+            'es' => ['first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres'],
210 210
         ];
211 211
         return new RowsOfFields($outputData);
212 212
     }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     public function alterFormatters($result, CommandData $commandData)
242 242
     {
243 243
         if ($commandData->input()->getOption('french')) {
244
-            $result['fr'] = [ 'first' => 'Un',  'second' => 'Deux',  'third' => 'Trois'  ];
244
+            $result['fr'] = ['first' => 'Un', 'second' => 'Deux', 'third' => 'Trois'];
245 245
         }
246 246
 
247 247
         return $result;
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             ->taskForEach($processList)
397 397
                 ->iterationMessage('Processing {value}')
398 398
                 ->call(
399
-                    function ($value) use($delay) {
399
+                    function($value) use($delay) {
400 400
                         // TaskForEach::call should only be used to do
401 401
                         // non-Robo operations. To use Robo tasks in an
402 402
                         // iterator, @see TaskForEach::withBuilder.
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
             ->taskCleanDir($workdir)
419 419
             ->taskForEach($processList)
420 420
                 ->withBuilder(
421
-                    function ($builder, $key, $value) use ($workdir) {
421
+                    function($builder, $key, $value) use ($workdir) {
422 422
                         return $builder
423 423
                             ->taskFilesystemStack()
424 424
                                 ->mkdir("$workdir/$value");
Please login to merge, or discard this patch.
tests/unit/Task/WatchTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         $task->monitor(
40 40
             'src',
41
-            function () {
41
+            function() {
42 42
                 //do nothing
43 43
             },
44 44
             1 // CREATE
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         $task->monitor(
55 55
             'src',
56
-            function () {
56
+            function() {
57 57
                 //do nothing
58 58
             },
59 59
             [
Please login to merge, or discard this patch.
tests/unit/Task/SemVerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     public function testSemverParseFileWithWindowsLineEndings()
52 52
     {
53 53
         $fixturePath = tempnam(sys_get_temp_dir(), 'semver');
54
-        $semverFile = str_replace("\n", "\r\n", file_get_contents(codecept_data_dir().'.semver'));
54
+        $semverFile = str_replace("\n", "\r\n", file_get_contents(codecept_data_dir() . '.semver'));
55 55
         file_put_contents($fixturePath, $semverFile);
56 56
 
57 57
         $res = (new \Robo\Task\Development\SemVer($fixturePath))
Please login to merge, or discard this patch.
tests/cli/CollectionCest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function _before(CliGuy $I)
12 12
     {
13
-        $I->amInPath(codecept_data_dir().'sandbox');
13
+        $I->amInPath(codecept_data_dir() . 'sandbox');
14 14
     }
15 15
 
16 16
     public function toRunMultipleTasksViaACollectionBuilder(CliGuy $I)
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             ->rollback(
123 123
                 $I->taskDeleteDir('j')
124 124
             )
125
-            ->rollbackCode(function () {
125
+            ->rollbackCode(function() {
126 126
                 throw new AbortTasksException('Aborting rollback.');
127 127
             })
128 128
             ->taskFilesystemStack()
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 ->mkdir('stuff')
182 182
             ->taskForEach($processList)
183 183
                 ->withBuilder(
184
-                    function ($builder, $key, $value) {
184
+                    function($builder, $key, $value) {
185 185
                         return $builder
186 186
                             ->taskFilesystemStack()
187 187
                                 ->touch("stuff/{$value}.txt");
@@ -238,32 +238,32 @@  discard block
 block discarded – undo
238 238
 
239 239
     public function toRollbackInCorrectOrder(CliGuy $I)
240 240
     {
241
-        $expected_order = [6,5,4,3,2,1];
241
+        $expected_order = [6, 5, 4, 3, 2, 1];
242 242
         $actual_order = [];
243 243
         $collection = $I->collectionBuilder();
244
-        $collection->rollbackCode(function () use (&$actual_order) {
244
+        $collection->rollbackCode(function() use (&$actual_order) {
245 245
             $actual_order[] = 1;
246 246
         });
247
-        $collection->rollbackCode(function () use (&$actual_order) {
247
+        $collection->rollbackCode(function() use (&$actual_order) {
248 248
             $actual_order[] = 2;
249 249
         });
250
-        $collection->rollbackCode(function () use (&$actual_order) {
250
+        $collection->rollbackCode(function() use (&$actual_order) {
251 251
             $actual_order[] = 3;
252 252
         });
253 253
         // Add a nested collection with rollbacks.
254 254
         $nested_collection = $I->collectionBuilder();
255
-        $nested_collection->rollbackCode(function () use (&$actual_order) {
255
+        $nested_collection->rollbackCode(function() use (&$actual_order) {
256 256
             $actual_order[] = 4;
257 257
         });
258
-        $nested_collection->rollbackCode(function () use (&$actual_order) {
258
+        $nested_collection->rollbackCode(function() use (&$actual_order) {
259 259
             $actual_order[] = 5;
260 260
         });
261 261
         $collection->addTask($nested_collection);
262 262
 
263
-        $collection->rollbackCode(function () use (&$actual_order) {
263
+        $collection->rollbackCode(function() use (&$actual_order) {
264 264
             $actual_order[] = 6;
265 265
         });
266
-        $collection->addCode(function () {
266
+        $collection->addCode(function() {
267 267
             return Result::EXITCODE_ERROR;
268 268
         });
269 269
         $result = $collection->run();
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
         $collection = $I->getContainer()->get('collection');
464 464
 
465 465
         $collection->addCode(
466
-            function () {
466
+            function() {
467 467
                 throw new \RuntimeException('Error');
468 468
             }
469 469
         );
Please login to merge, or discard this patch.
tests/unit/ClassDiscovery/RelativeNamespaceDiscoveryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     public function testGetClasses()
12 12
     {
13 13
         $classLoader = new ClassLoader();
14
-        $classLoader->addPsr4('\\Robo\\PluginTest\\', [realpath(__DIR__.'/../../plugins')]);
14
+        $classLoader->addPsr4('\\Robo\\PluginTest\\', [realpath(__DIR__ . '/../../plugins')]);
15 15
         $service = new RelativeNamespaceDiscovery($classLoader);
16 16
         $service->setRelativeNamespace('Robo\Plugin');
17 17
         $service->setSearchPattern('/.*Commands?\.php$/');
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function testGetFile()
27 27
     {
28 28
         $classLoader = new ClassLoader();
29
-        $classLoader->addPsr4('\\Robo\\PluginTest\\', [realpath(__DIR__.'/../../plugins')]);
29
+        $classLoader->addPsr4('\\Robo\\PluginTest\\', [realpath(__DIR__ . '/../../plugins')]);
30 30
         $service = new RelativeNamespaceDiscovery($classLoader);
31 31
         $service->setRelativeNamespace('Robo\Plugin');
32 32
 
Please login to merge, or discard this patch.
tests/_bootstrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
     'debug' => true,
7 7
     'cacheDir' => '/tmp',
8 8
     'includePaths' => [
9
-        __DIR__.'/../src',
10
-        __DIR__.'/../vendor/symfony/process',
11
-        __DIR__.'/../vendor/symfony/console',
12
-        __DIR__.'/../vendor/henrikbjorn/lurker/src',
9
+        __DIR__ . '/../src',
10
+        __DIR__ . '/../vendor/symfony/process',
11
+        __DIR__ . '/../vendor/symfony/console',
12
+        __DIR__ . '/../vendor/henrikbjorn/lurker/src',
13 13
     ]
14 14
 ]);
Please login to merge, or discard this patch.