@@ -51,7 +51,7 @@ |
||
| 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)) |
@@ -11,7 +11,6 @@ |
||
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * @command cat |
| 14 | - * @param string $file |
|
| 15 | 14 | * @default $file - |
| 16 | 15 | */ |
| 17 | 16 | public function cat(InputInterface $input) |
@@ -10,7 +10,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | ); |
@@ -45,6 +45,9 @@ |
||
| 45 | 45 | return $result ?: $this->parentOutput(); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @return InputInterface |
|
| 50 | + */ |
|
| 48 | 51 | protected function input() |
| 49 | 52 | { |
| 50 | 53 | $result = null; |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | * |
| 131 | 131 | * @param string $value |
| 132 | 132 | * |
| 133 | - * @return array |
|
| 133 | + * @return boolean[] |
|
| 134 | 134 | */ |
| 135 | 135 | protected function splitConfigKeyValue($value) |
| 136 | 136 | { |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | - * @param array $argv |
|
| 139 | + * @param string[] $argv |
|
| 140 | 140 | * @param null|string $appName |
| 141 | 141 | * @param null|string $appVersion |
| 142 | 142 | * @param null|\Symfony\Component\Console\Output\OutputInterface $output |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * @param null|\Symfony\Component\Console\Input\InputInterface $input |
| 176 | 176 | * @param null|\Symfony\Component\Console\Output\OutputInterface $output |
| 177 | 177 | * @param null|\Robo\Application $app |
| 178 | - * @param array[] $commandFiles |
|
| 178 | + * @param null|string $commandFiles |
|
| 179 | 179 | * @param null|ClassLoader $classLoader |
| 180 | 180 | * |
| 181 | 181 | * @return int |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | } |
| 536 | 536 | |
| 537 | 537 | /** |
| 538 | - * @param $selfUpdateRepository |
|
| 538 | + * @param null|string $selfUpdateRepository |
|
| 539 | 539 | * |
| 540 | 540 | * @return $this |
| 541 | 541 | */ |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | public function __construct($roboClass = null, $roboFile = null) |
| 81 | 81 | { |
| 82 | 82 | // set the const as class properties to allow overwriting in child classes |
| 83 | - $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS ; |
|
| 83 | + $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS; |
|
| 84 | 84 | $this->roboFile = $roboFile ? $roboFile : self::ROBOFILE; |
| 85 | 85 | $this->dir = getcwd(); |
| 86 | 86 | } |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | { |
| 280 | 280 | /** @var \Robo\ClassDiscovery\RelativeNamespaceDiscovery $discovery */ |
| 281 | 281 | $discovery = Robo::service('relativeNamespaceDiscovery'); |
| 282 | - $discovery->setRelativeNamespace($relativeNamespace.'\Commands') |
|
| 282 | + $discovery->setRelativeNamespace($relativeNamespace . '\Commands') |
|
| 283 | 283 | ->setSearchPattern('/.*Commands?\.php$/'); |
| 284 | 284 | return $discovery->getClasses(); |
| 285 | 285 | } |
@@ -460,9 +460,9 @@ discard block |
||
| 460 | 460 | |
| 461 | 461 | if (substr($argv[$pos], 0, 12) == '--load-from=') { |
| 462 | 462 | $this->dir = substr($argv[$pos], 12); |
| 463 | - } elseif (isset($argv[$pos +1])) { |
|
| 464 | - $this->dir = $argv[$pos +1]; |
|
| 465 | - unset($argv[$pos +1]); |
|
| 463 | + } elseif (isset($argv[$pos + 1])) { |
|
| 464 | + $this->dir = $argv[$pos + 1]; |
|
| 465 | + unset($argv[$pos + 1]); |
|
| 466 | 466 | } |
| 467 | 467 | unset($argv[$pos]); |
| 468 | 468 | // Make adjustments if '--load-from' points at a file. |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | trait loadTasks |
| 5 | 5 | { |
| 6 | 6 | /** |
| 7 | - * @param string|\Robo\Contract\CommandInterface $command |
|
| 7 | + * @param string $command |
|
| 8 | 8 | * |
| 9 | 9 | * @return \Robo\Task\Base\Exec|\Robo\Collection\CollectionBuilder |
| 10 | 10 | */ |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | - * @param string|array $url |
|
| 78 | + * @param string[] $url |
|
| 79 | 79 | * |
| 80 | 80 | * @return \Robo\Task\Development\OpenBrowser|\Robo\Collection\CollectionBuilder |
| 81 | 81 | */ |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | - * @param string|string[] $dirs |
|
| 17 | + * @param string $dirs |
|
| 18 | 18 | * |
| 19 | 19 | * @return \Robo\Task\Filesystem\DeleteDir|\Robo\Collection\CollectionBuilder |
| 20 | 20 | */ |