Completed
Push — master ( a243b0...e4b7e2 )
by Greg
02:20
created
tests/_helpers/SeeInOutputTrait.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@  discard block
 block discarded – undo
11 11
     protected $capturedOutput;
12 12
     protected $logger;
13 13
 
14
+    /**
15
+     * @param \League\Container\Container $container
16
+     */
14 17
     public function initSeeInOutputTrait($container, $input = null)
15 18
     {
16 19
         $this->capturedOutput = '';
@@ -65,6 +68,7 @@  discard block
 block discarded – undo
65 68
     /**
66 69
      * Make our output comparisons more platform-agnostic by converting
67 70
      * CRLF (Windows) or raw CR (confused output) to a LF (unix/Mac).
71
+     * @param string $output
68 72
      */
69 73
     protected function simplify($output)
70 74
     {
Please login to merge, or discard this patch.
tests/unit/Common/ResultDataTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
         $a = new ResultData(ResultData::EXITCODE_OK, '', ['one' => 'first', 'two' => 'second']);
34 34
 
35 35
         $to_be_merged = [
36
-            ['one' => 'ignored',],
37
-            ['three' => 'new',],
36
+            ['one' => 'ignored', ],
37
+            ['three' => 'new', ],
38 38
         ];
39 39
 
40 40
         foreach ($to_be_merged as $mergeThis) {
Please login to merge, or discard this patch.
src/Collection/Collection.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Robo\Exception\TaskException;
13 13
 use Robo\Exception\TaskExitException;
14 14
 use Robo\Contract\CommandInterface;
15
-
16 15
 use Robo\Contract\InflectionInterface;
17 16
 use Robo\State\StateAwareInterface;
18 17
 use Robo\State\StateAwareTrait;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $collection = $this;
137 137
         $completionRegistrationTask = new CallableTask(
138
-            function () use ($collection, $completionTask) {
138
+            function() use ($collection, $completionTask) {
139 139
 
140 140
                 $collection->registerCompletion($completionTask);
141 141
             },
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $context += ['name' => 'Progress'];
179 179
         $context += TaskInfo::getTaskContext($this);
180 180
         return $this->addCode(
181
-            function () use ($level, $text, $context) {
181
+            function() use ($level, $text, $context) {
182 182
                 $context += $this->getState()->getData();
183 183
                 $this->printTaskOutput($level, $text, $context);
184 184
             }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     {
195 195
         $collection = $this;
196 196
         $rollbackRegistrationTask = new CallableTask(
197
-            function () use ($collection, $rollbackTask) {
197
+            function() use ($collection, $rollbackTask) {
198 198
                 $collection->registerRollback($rollbackTask);
199 199
             },
200 200
             $this
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         if ($task instanceof StackBasedTask) {
248 248
             $task->stopOnFail(false);
249 249
         }
250
-        $ignoreErrorsInTask = function () use ($task) {
250
+        $ignoreErrorsInTask = function() use ($task) {
251 251
             $data = [];
252 252
             try {
253 253
                 $result = $this->runSubtask($task);
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
     {
680 680
         return $this->defer(
681 681
             $task,
682
-            function ($task, $state) use ($functionName, $stateKey) {
682
+            function($task, $state) use ($functionName, $stateKey) {
683 683
                 $fn = [$task, $functionName];
684 684
                 $value = $state[$stateKey];
685 685
                 $fn($value);
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      *
213 213
      * @param string $method
214 214
      * @param string $name
215
-     * @param callable|\Robo\Contract\TaskInterface $task
215
+     * @param callable $task
216 216
      * @param string $nameOfTaskToAdd
217 217
      *
218 218
      * @return $this
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     /**
284 284
      * Return the list of task names added to this collection.
285 285
      *
286
-     * @return string[]
286
+     * @return integer[]
287 287
      */
288 288
     public function taskNames()
289 289
     {
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     }
357 357
 
358 358
     /**
359
-     * @param int|string $name
359
+     * @param string $name
360 360
      * @param \Robo\Collection\Element $taskGroup
361 361
      *
362 362
      * @return $this
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
     }
649 649
 
650 650
     /**
651
-     * @param \Robo\Contract\TaskInterface|\Robo\Collection\NestedCollectionInterface|\Robo\Contract\WrappedTaskInterface $task
651
+     * @param TaskInterface $task
652 652
      *
653 653
      * @return \Robo\Result
654 654
      */
Please login to merge, or discard this patch.
tests/unit/Task/CollectionTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Robo\Robo;
10 10
 use Robo\Result;
11 11
 use Robo\State\Data;
12
-use Robo\Task\BaseTask;
13 12
 use Robo\Collection\Collection;
14 13
 use Robo\Task\ValueProviderTask;
15 14
 use Robo\Task\CollectionTestTask;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
             ->completion($completion1)
111 111
             ->rollbackCode(function() use($rollback1) { $rollback1->run(); } )
112 112
             ->completionCode(function() use($completion1) { $completion1->run(); } )
113
-            ->addCode(function () { return 42; })
113
+            ->addCode(function() { return 42; })
114 114
             ->progressMessage("not reached")
115 115
             ->rollback($rollback2)
116 116
             ->completion($completion2)
117
-            ->addCode(function () { return 13; });
117
+            ->addCode(function() { return 13; });
118 118
 
119 119
         $collection->setLogger($this->guy->logger());
120 120
 
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
 
138 138
         $result = $collection
139 139
             ->addCode(
140
-                function (Data $state) {
140
+                function(Data $state) {
141 141
                     $state['one'] = 'first';
142 142
                 })
143 143
             ->addCode(
144
-                function (Data $state) {
144
+                function(Data $state) {
145 145
                     $state['two'] = 'second';
146 146
                 })
147 147
             ->addCode(
148
-                function (Data $state) {
148
+                function(Data $state) {
149 149
                     $state['three'] = "{$state['one']} and {$state['two']}";
150 150
                 })
151 151
             ->run();
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             ->add($first)
170 170
             ->add($second)
171 171
             ->addCode(
172
-                function (Data $state) {
172
+                function(Data $state) {
173 173
                     $state['three'] = "{$state['one']} and {$state['two']}";
174 174
                 })
175 175
             ->run();
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             ->add($third)
199 199
                 ->defer(
200 200
                     $third,
201
-                    function ($task, $state) {
201
+                    function($task, $state) {
202 202
                         $task->provideData('three', "{$state['one']} and {$state['two']}");
203 203
                     }
204 204
                 )
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             ->add($third)
231 231
                 ->defer(
232 232
                     $third,
233
-                    function ($task, $state) {
233
+                    function($task, $state) {
234 234
                         $task->provideData('three', "{$state['one']} and {$state['two']}");
235 235
                     }
236 236
                 )
Please login to merge, or discard this patch.
tests/unit/Task/ComposerTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 use AspectMock\Test as test;
3
-
4 3
 use Robo\Traits\Common\AdjustQuotes;
5 4
 
6 5
 class ComposerTest extends \Codeception\TestCase\Test
Please login to merge, or discard this patch.
tests/unit/Task/GulpTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 use AspectMock\Test as test;
3
-
4 3
 use Robo\Traits\Common\AdjustQuotes;
5 4
 
6 5
 class GulpTest extends \Codeception\TestCase\Test
Please login to merge, or discard this patch.
Spacing   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,32 +24,32 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $this->assertEquals(
26 26
             $this->adjustQuotes("gulp 'default'"),
27
-            (new \Robo\Task\Gulp\Run('default','gulp'))->getCommand()
27
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->getCommand()
28 28
         );
29 29
 
30 30
         $this->assertEquals(
31 31
             $this->adjustQuotes("gulp 'another'"),
32
-            (new \Robo\Task\Gulp\Run('another','gulp'))->getCommand()
32
+            (new \Robo\Task\Gulp\Run('another', 'gulp'))->getCommand()
33 33
         );
34 34
 
35 35
         $this->assertEquals(
36 36
             $this->adjustQuotes("gulp 'default' --silent"),
37
-            (new \Robo\Task\Gulp\Run('default','gulp'))->silent()->getCommand()
37
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->silent()->getCommand()
38 38
         );
39 39
 
40 40
         $this->assertEquals(
41 41
             $this->adjustQuotes("gulp 'default' --no-color"),
42
-            (new \Robo\Task\Gulp\Run('default','gulp'))->noColor()->getCommand()
42
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->noColor()->getCommand()
43 43
         );
44 44
 
45 45
         $this->assertEquals(
46 46
             $this->adjustQuotes("gulp 'default' --color"),
47
-            (new \Robo\Task\Gulp\Run('default','gulp'))->color()->getCommand()
47
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->color()->getCommand()
48 48
         );
49 49
 
50 50
         $this->assertEquals(
51 51
             $this->adjustQuotes("gulp 'default' --tasks-simple"),
52
-            (new \Robo\Task\Gulp\Run('default','gulp'))->simple()->getCommand()
52
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple()->getCommand()
53 53
         );
54 54
     }
55 55
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $gulp = test::double('Robo\Task\Gulp\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]);
59 59
 
60
-        $task = (new \Robo\Task\Gulp\Run('default','gulp'))->simple();
60
+        $task = (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple();
61 61
         $this->assertEquals(
62 62
             $this->adjustQuotes("gulp 'default' --tasks-simple"),
63 63
             $task->getCommand());
@@ -69,12 +69,11 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $isWindows = defined('PHP_WINDOWS_VERSION_MAJOR');
71 71
         $expected = $isWindows ?
72
-            'gulp "anotherWith weired!(\"\') Chars"' :
73
-            "gulp 'anotherWith weired!(\"'\\'') Chars'";
72
+            'gulp "anotherWith weired!(\"\') Chars"' : "gulp 'anotherWith weired!(\"'\\'') Chars'";
74 73
 
75 74
         $this->assertEquals(
76 75
             $expected,
77
-            (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand()
76
+            (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand()
78 77
         );
79 78
     }
80 79
 }
Please login to merge, or discard this patch.
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.
tests/cli/CopyDirRecursiveExcludeCept.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 $I = new CliGuy($scenario);
3 3
 
4 4
 $I->wantTo('copy dir recursively with CopyDir task, but exclude a file');
5
-$I->amInPath(codecept_data_dir().'sandbox');
5
+$I->amInPath(codecept_data_dir() . 'sandbox');
6 6
 $I->seeDirFound('some/deeply/nested');
7 7
 $I->seeDirFound('some/deeply/nested2');
8 8
 $I->seeDirFound('some/deeply/nested3');
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.