@@ -4,7 +4,7 @@ |
||
| 4 | 4 | trait loadTasks |
| 5 | 5 | { |
| 6 | 6 | /** |
| 7 | - * @param array|\Iterator $files |
|
| 7 | + * @param string[] $files |
|
| 8 | 8 | * |
| 9 | 9 | * @return \Robo\Task\File\Concat|\Robo\Collection\CollectionBuilder |
| 10 | 10 | */ |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | * Sets the value from which direction and how much parent dirs should be included. |
| 137 | 137 | * Accepts a positive or negative integer or an array with two integer values. |
| 138 | 138 | * |
| 139 | - * @param int|int[] $parents |
|
| 139 | + * @param integer[] $parents |
|
| 140 | 140 | * |
| 141 | 141 | * @return $this |
| 142 | 142 | * |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | /** |
| 201 | - * @param array $dirs |
|
| 201 | + * @param string[] $dirs |
|
| 202 | 202 | * |
| 203 | 203 | * @return array|\Robo\Result |
| 204 | 204 | * |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | */ |
| 128 | 128 | public function dirPermissions($permission) |
| 129 | 129 | { |
| 130 | - $this->chmod = (int) $permission; |
|
| 130 | + $this->chmod = (int)$permission; |
|
| 131 | 131 | |
| 132 | 132 | return $this; |
| 133 | 133 | } |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | trait loadTasks |
| 5 | 5 | { |
| 6 | 6 | /** |
| 7 | - * @param string|string[] $dirs |
|
| 7 | + * @param string[] $dirs |
|
| 8 | 8 | * |
| 9 | 9 | * @return \Robo\Task\Filesystem\CleanDir|\Robo\Collection\CollectionBuilder |
| 10 | 10 | */ |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $this->fixtures->createAndCdToSandbox(); |
| 45 | 45 | |
| 46 | 46 | $result = $this->taskFlattenDir('some/deeply/nested/*.re') |
| 47 | - ->includeParents([1,1]) |
|
| 47 | + ->includeParents([1, 1]) |
|
| 48 | 48 | ->parentDir('some') |
| 49 | 49 | ->to('flattened') |
| 50 | 50 | ->run(); |
@@ -25,29 +25,29 @@ |
||
| 25 | 25 | public function testCssMinification() |
| 26 | 26 | { |
| 27 | 27 | if (version_compare(PHP_VERSION, '7.2.0') >= 0) { |
| 28 | - $this->markTestSkipped('natxet/cssmin uses deprecated "each()" function (PHP 7.2+)'); |
|
| 28 | + $this->markTestSkipped('natxet/cssmin uses deprecated "each()" function (PHP 7.2+)'); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $this->fixtures->createAndCdToSandbox(); |
| 32 | 32 | |
| 33 | - $sampleCss = $this->fixtures->dataFile('sample.css'); |
|
| 34 | - $outputCss = 'minifiedSample.css'; |
|
| 33 | + $sampleCss = $this->fixtures->dataFile('sample.css'); |
|
| 34 | + $outputCss = 'minifiedSample.css'; |
|
| 35 | 35 | |
| 36 | - $initialFileSize = filesize($sampleCss); |
|
| 36 | + $initialFileSize = filesize($sampleCss); |
|
| 37 | 37 | |
| 38 | - $result = $this->taskMinify($sampleCss) |
|
| 39 | - ->to('minifiedSample.css') |
|
| 40 | - ->run(); |
|
| 38 | + $result = $this->taskMinify($sampleCss) |
|
| 39 | + ->to('minifiedSample.css') |
|
| 40 | + ->run(); |
|
| 41 | 41 | $this->assertTrue($result->wasSuccessful()); |
| 42 | 42 | |
| 43 | - $this->assertFileExists($outputCss); |
|
| 44 | - $minifiedFileSize = filesize($outputCss); |
|
| 45 | - $outputCssContents = file_get_contents($outputCss); |
|
| 43 | + $this->assertFileExists($outputCss); |
|
| 44 | + $minifiedFileSize = filesize($outputCss); |
|
| 45 | + $outputCssContents = file_get_contents($outputCss); |
|
| 46 | 46 | |
| 47 | - $this->assertLessThan($initialFileSize, $minifiedFileSize, 'Minified file is smaller than the source file'); |
|
| 48 | - $this->assertGreaterThan(0, $minifiedFileSize, 'Minified file is not empty'); |
|
| 49 | - $this->assertContains('body', $outputCssContents, 'Minified file has some content from the source file'); |
|
| 50 | - $this->assertNotContains('Sample css file', $outputCssContents, 'Minified file does not contain comment from source file'); |
|
| 47 | + $this->assertLessThan($initialFileSize, $minifiedFileSize, 'Minified file is smaller than the source file'); |
|
| 48 | + $this->assertGreaterThan(0, $minifiedFileSize, 'Minified file is not empty'); |
|
| 49 | + $this->assertContains('body', $outputCssContents, 'Minified file has some content from the source file'); |
|
| 50 | + $this->assertNotContains('Sample css file', $outputCssContents, 'Minified file does not contain comment from source file'); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $task = $this->taskExec('env | wc -l')->interactive(false); |
| 69 | 69 | $result = $task->run(); |
| 70 | 70 | $this->assertTrue($result->wasSuccessful()); |
| 71 | - $start_count = (int) $result->getMessage(); |
|
| 71 | + $start_count = (int)$result->getMessage(); |
|
| 72 | 72 | $this->assertGreaterThan(0, $start_count); |
| 73 | 73 | |
| 74 | 74 | // Verify that we get the same amount of environment variables with |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $this->assertTrue($result->wasSuccessful()); |
| 79 | 79 | $this->assertEquals( |
| 80 | 80 | $start_count, |
| 81 | - (int) $result->getMessage()); |
|
| 81 | + (int)$result->getMessage()); |
|
| 82 | 82 | |
| 83 | 83 | // Now run the same command, but this time add another environment |
| 84 | 84 | // variable, and see if our count increases by one. |
@@ -86,6 +86,6 @@ discard block |
||
| 86 | 86 | $task->env('FOO', 'BAR'); |
| 87 | 87 | $result = $task->run(); |
| 88 | 88 | $this->assertTrue($result->wasSuccessful()); |
| 89 | - $this->assertEquals($start_count + 1, (int) $result->getMessage()); |
|
| 89 | + $this->assertEquals($start_count + 1, (int)$result->getMessage()); |
|
| 90 | 90 | } |
| 91 | 91 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $createRoboFile = new Command('init'); |
| 42 | 42 | $createRoboFile->setDescription("Intitalizes basic RoboFile in current dir"); |
| 43 | - $createRoboFile->setCode(function () use ($roboClass, $roboFile) { |
|
| 43 | + $createRoboFile->setCode(function() use ($roboClass, $roboFile) { |
|
| 44 | 44 | $output = Robo::output(); |
| 45 | 45 | $output->writeln("<comment> ~~~ Welcome to Robo! ~~~~ </comment>"); |
| 46 | 46 | $output->writeln("<comment> " . basename($roboFile) . " will be created in the current directory </comment>"); |
@@ -705,7 +705,7 @@ discard block |
||
| 705 | 705 | return implode( |
| 706 | 706 | "\n", |
| 707 | 707 | array_map( |
| 708 | - function ($line) use ($indent) { |
|
| 708 | + function($line) use ($indent) { |
|
| 709 | 709 | return substr($line, $indent); |
| 710 | 710 | }, |
| 711 | 711 | explode("\n", $doc) |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | $params = implode( |
| 728 | 728 | ', ', |
| 729 | 729 | array_map( |
| 730 | - function ($p) { |
|
| 730 | + function($p) { |
|
| 731 | 731 | return $this->documentParam($p); |
| 732 | 732 | }, |
| 733 | 733 | $reflectedMethod->getParameters() |
@@ -59,8 +59,8 @@ discard block |
||
| 59 | 59 | // set iterable in the __constructor |
| 60 | 60 | $result = $this |
| 61 | 61 | ->taskForEach($items) |
| 62 | - ->withBuilder(function (CollectionBuilder $builder, $key, $value) use (&$actual) { |
|
| 63 | - $builder->addCode(function () use ($key, $value, &$actual) { |
|
| 62 | + ->withBuilder(function(CollectionBuilder $builder, $key, $value) use (&$actual) { |
|
| 63 | + $builder->addCode(function() use ($key, $value, &$actual) { |
|
| 64 | 64 | $actual[] = "$key = $value"; |
| 65 | 65 | |
| 66 | 66 | return 0; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | // set iterable with deferTaskConfiguration() |
| 83 | 83 | $result = $this |
| 84 | 84 | ->collectionBuilder() |
| 85 | - ->addCode(function (Data $data) use ($items) { |
|
| 85 | + ->addCode(function(Data $data) use ($items) { |
|
| 86 | 86 | $data['items'] = $items; |
| 87 | 87 | |
| 88 | 88 | return 0; |
@@ -91,8 +91,8 @@ discard block |
||
| 91 | 91 | $this |
| 92 | 92 | ->taskForEach() |
| 93 | 93 | ->deferTaskConfiguration('setIterable', 'items') |
| 94 | - ->withBuilder(function (CollectionBuilder $builder, $key, $value) use (&$actual) { |
|
| 95 | - $builder->addCode(function () use ($key, $value, &$actual) { |
|
| 94 | + ->withBuilder(function(CollectionBuilder $builder, $key, $value) use (&$actual) { |
|
| 95 | + $builder->addCode(function() use ($key, $value, &$actual) { |
|
| 96 | 96 | $actual[] = "$key = $value"; |
| 97 | 97 | |
| 98 | 98 | return 0; |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | // call the __constructor() without argument |
| 112 | 112 | $result = $this |
| 113 | 113 | ->taskForEach() |
| 114 | - ->withBuilder(function (CollectionBuilder $builder, $key, $value) use (&$actual) { |
|
| 115 | - $builder->addCode(function () use ($key, $value, &$actual) { |
|
| 114 | + ->withBuilder(function(CollectionBuilder $builder, $key, $value) use (&$actual) { |
|
| 115 | + $builder->addCode(function() use ($key, $value, &$actual) { |
|
| 116 | 116 | $actual++; |
| 117 | 117 | |
| 118 | 118 | return 0; |