Completed
Push — master ( 2fa00d...5efdd3 )
by Greg
03:04
created
src/Task/Docker/Run.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     }
127 127
 
128 128
     /**
129
-     * @param string|\Robo\Contract\CommandInterface $run
129
+     * @param string $run
130 130
      *
131 131
      * @return $this
132 132
      */
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      * inherited from ExecTrait.
156 156
      *
157 157
      * @param array $env
158
-     * @return type
158
+     * @return Run
159 159
      */
160 160
     public function envVars(array $env)
161 161
     {
Please login to merge, or discard this patch.
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
Doc Comments   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      *
208 208
      * @param string $method
209 209
      * @param string $name
210
-     * @param callable|TaskInterface $task
210
+     * @param callable $task
211 211
      * @param string $nameOfTaskToAdd
212 212
      *
213 213
      * @return $this
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
     /**
277 277
      * Return the list of task names added to this collection.
278 278
      *
279
-     * @return array
279
+     * @return integer[]
280 280
      */
281 281
     public function taskNames()
282 282
     {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     }
350 350
 
351 351
     /**
352
-     * @param int|string $name
352
+     * @param string $name
353 353
      * @param \Robo\Collection\Element $taskGroup
354 354
      *
355 355
      * @return $this
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
     }
636 636
 
637 637
     /**
638
-     * @param TaskInterface|NestedCollectionInterface|WrappedTaskInterface $task
638
+     * @param TaskInterface $task
639 639
      *
640 640
      * @return \Robo\Result
641 641
      */
@@ -689,6 +689,7 @@  discard block
 block discarded – undo
689 689
      * runs. Use this time to provide more settings for the task, e.g. from
690 690
      * the collection's shared state, which is populated with the results
691 691
      * of previous test runs.
692
+     * @param \Closure $callback
692 693
      */
693 694
     public function defer($task, $callback)
694 695
     {
@@ -711,7 +712,7 @@  discard block
 block discarded – undo
711 712
 
712 713
     /**
713 714
      * @param TaskInterface|NestedCollectionInterface|WrappedTaskInterface $task
714
-     * @param $parentCollection
715
+     * @param CollectionInterface $parentCollection
715 716
      */
716 717
     protected function setParentCollectionForTask($task, $parentCollection)
717 718
     {
Please login to merge, or discard this patch.
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.
src/Collection/CollectionInterface.php 1 patch
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      *
26 26
      * @param TaskInterface $task
27 27
      *   The task to add to our collection.
28
-     * @param int|string $name
28
+     * @param integer $name
29 29
      *   An optional name for the task -- missing or UNNAMEDTASK for unnamed tasks.
30 30
      *   Names are used for positioning before and after tasks.
31 31
      *
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * Add arbitrary code to execute as a task.
38 38
      *
39 39
      * @param callable $code Code to execute as a task
40
-     * @param int|string $name
40
+     * @param integer $name
41 41
      *   An optional name for the task -- missing or UNNAMEDTASK for unnamed tasks.
42 42
      *   Names are used for positioning before and after tasks.
43 43
      *
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
      *
110 110
      * @param string $name
111 111
      *   The name of the task to insert before.  The named task MUST exist.
112
-     * @param callable|TaskInterface $task
112
+     * @param callable $task
113 113
      *   The task to add.
114
-     * @param int|string $nameOfTaskToAdd
114
+     * @param integer $nameOfTaskToAdd
115 115
      *   The name of the task to add. If not provided, will be associated
116 116
      *   with the named task it was added before.
117 117
      *
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @param string $name
126 126
      *   The name of the task to insert before.  The named task MUST exist.
127
-     * @param callable|TaskInterface $task
127
+     * @param callable $task
128 128
      *   The task to add.
129
-     * @param int|string $nameOfTaskToAdd
129
+     * @param integer $nameOfTaskToAdd
130 130
      *   The name of the task to add. If not provided, will be associated
131 131
      *   with the named task it was added after.
132 132
      *
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      * @param string $text Message to print.
144 144
      * @param array $context Extra context data for use by the logger. Note
145 145
      *   that the data from the collection state is merged with the provided context.
146
-     * @param \Psr\Log\LogLevel|string $level The log level to print the information at. Default is NOTICE.
146
+     * @param string $level The log level to print the information at. Default is NOTICE.
147 147
      *
148 148
      * @return $this
149 149
      */
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.
src/Config/Config.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      * Return the default value for a given configuration item.
140 140
      *
141 141
      * @param string $key
142
-     * @param mixed $defaultOverride
142
+     * @param string|null $defaultOverride
143 143
      *
144 144
      * @return mixed
145 145
      */
@@ -190,7 +190,6 @@  discard block
 block discarded – undo
190 190
     }
191 191
 
192 192
     /**
193
-     * @param bool $simulated
194 193
      *
195 194
      * @return $this
196 195
      */
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, -9 removed lines patch added patch discarded remove patch
@@ -23,27 +23,27 @@  discard block
 block discarded – undo
23 23
     public function testGulpGetCommand()
24 24
     {
25 25
         verify(
26
-            (new \Robo\Task\Gulp\Run('default','gulp'))->getCommand()
26
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->getCommand()
27 27
         )->equals($this->adjustQuotes("gulp 'default'"));
28 28
 
29 29
         verify(
30
-            (new \Robo\Task\Gulp\Run('another','gulp'))->getCommand()
30
+            (new \Robo\Task\Gulp\Run('another', 'gulp'))->getCommand()
31 31
         )->equals($this->adjustQuotes("gulp 'another'"));
32 32
 
33 33
         verify(
34
-            (new \Robo\Task\Gulp\Run('default','gulp'))->silent()->getCommand()
34
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->silent()->getCommand()
35 35
         )->equals($this->adjustQuotes("gulp 'default' --silent"));
36 36
 
37 37
         verify(
38
-            (new \Robo\Task\Gulp\Run('default','gulp'))->noColor()->getCommand()
38
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->noColor()->getCommand()
39 39
         )->equals($this->adjustQuotes("gulp 'default' --no-color"));
40 40
 
41 41
         verify(
42
-            (new \Robo\Task\Gulp\Run('default','gulp'))->color()->getCommand()
42
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->color()->getCommand()
43 43
         )->equals($this->adjustQuotes("gulp 'default' --color"));
44 44
 
45 45
         verify(
46
-            (new \Robo\Task\Gulp\Run('default','gulp'))->simple()->getCommand()
46
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple()->getCommand()
47 47
         )->equals($this->adjustQuotes("gulp 'default' --tasks-simple"));
48 48
     }
49 49
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $gulp = test::double('Robo\Task\Gulp\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]);
53 53
 
54
-        $task = (new \Robo\Task\Gulp\Run('default','gulp'))->simple();
54
+        $task = (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple();
55 55
         verify($task->getCommand())->equals($this->adjustQuotes("gulp 'default' --tasks-simple"));
56 56
         $task->run();
57 57
         $gulp->verifyInvoked('executeCommand', [$this->adjustQuotes("gulp 'default' --tasks-simple")]);
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
         if ($isWindows) {
65 65
 
66 66
             verify(
67
-                (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand()
67
+                (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand()
68 68
             )->equals('gulp "anotherWith weired!(\"\') Chars"');
69 69
 
70 70
         } else {
71 71
 
72 72
             verify(
73
-                (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand()
73
+                (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand()
74 74
             )->equals("gulp 'anotherWith weired!(\"'\\'') Chars'");
75 75
 
76 76
         }
Please login to merge, or discard this patch.