@@ -6,7 +6,6 @@ |
||
6 | 6 | use Robo\Contract\ProgressIndicatorAwareInterface; |
7 | 7 | use Robo\Contract\VerbosityThresholdInterface; |
8 | 8 | use Robo\Common\ProgressIndicatorAwareTrait; |
9 | - |
|
10 | 9 | use Psr\Log\LogLevel; |
11 | 10 | use Psr\Log\LoggerAwareInterface; |
12 | 11 | use Psr\Log\LoggerAwareTrait; |
@@ -247,7 +247,7 @@ |
||
247 | 247 | $this->process = $process; |
248 | 248 | |
249 | 249 | if (!$output_callback) { |
250 | - $output_callback = function ($type, $buffer) { |
|
250 | + $output_callback = function($type, $buffer) { |
|
251 | 251 | $progressWasVisible = $this->hideTaskProgress(); |
252 | 252 | $this->writeMessage($buffer); |
253 | 253 | $this->showTaskProgress($progressWasVisible); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | if (!is_array($args)) { |
72 | 72 | $args = func_get_args(); |
73 | 73 | } |
74 | - $args = array_map(function ($arg) { |
|
74 | + $args = array_map(function($arg) { |
|
75 | 75 | if (preg_match('/^\w+$/', trim($arg)) === 1) { |
76 | 76 | $this->operation = $arg; |
77 | 77 | return null; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * @param array|string|\Traversable $src |
|
168 | + * @param string $src |
|
169 | 169 | * One or more source values. |
170 | 170 | * |
171 | 171 | * @return $this |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
193 | - * @param array|string $exts |
|
193 | + * @param string $exts |
|
194 | 194 | * One or more extensions. |
195 | 195 | * |
196 | 196 | * @return $this |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
205 | - * @param array|string $exclude |
|
205 | + * @param string[] $exclude |
|
206 | 206 | * One or more exclusions. |
207 | 207 | * |
208 | 208 | * @return $this |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
219 | - * @param array|string|\Traversable $path |
|
219 | + * @param \SplDoublyLinkedList $path |
|
220 | 220 | * One or more skip-doc-path values. |
221 | 221 | * |
222 | 222 | * @return $this |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | |
246 | 246 | /** |
247 | - * @param array|string $charset |
|
247 | + * @param string[] $charset |
|
248 | 248 | * One or more charsets. |
249 | 249 | * |
250 | 250 | * @return $this |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Psr\Log\LoggerAwareTrait; |
6 | 6 | use Psr\Log\LoggerAwareInterface; |
7 | - |
|
8 | 7 | use Consolidation\AnnotatedCommand\Events\CustomEventAwareInterface; |
9 | 8 | use Consolidation\AnnotatedCommand\Events\CustomEventAwareTrait; |
10 | 9 | use Consolidation\OutputFormatters\StructuredData\PropertyList; |
@@ -11,6 +11,9 @@ discard block |
||
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 |
||
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 | { |
@@ -33,8 +33,8 @@ |
||
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) { |
@@ -12,7 +12,6 @@ |
||
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; |
@@ -135,7 +135,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -212,7 +212,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | */ |
@@ -9,7 +9,6 @@ |
||
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; |
@@ -110,11 +110,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ) |
@@ -1,6 +1,5 @@ |
||
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 |