@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | { |
12 | 12 | public function _before(CliGuy $I) |
13 | 13 | { |
14 | - $I->amInPath(codecept_data_dir().'sandbox'); |
|
14 | + $I->amInPath(codecept_data_dir() . 'sandbox'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | public function toRunMultipleTasksViaACollectionBuilder(CliGuy $I) |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | ->mkdir('stuff') |
151 | 151 | ->taskForEach($processList) |
152 | 152 | ->withBuilder( |
153 | - function ($builder, $key, $value) { |
|
153 | + function($builder, $key, $value) { |
|
154 | 154 | return $builder |
155 | 155 | ->taskFilesystemStack() |
156 | 156 | ->touch("stuff/{$value}.txt"); |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | $collection = $I->getContainer()->get('collection'); |
399 | 399 | |
400 | 400 | $collection->addCode( |
401 | - function () { |
|
401 | + function() { |
|
402 | 402 | throw new \RuntimeException('Error'); |
403 | 403 | } |
404 | 404 | ); |
@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | { |
12 | 12 | $I->wantTo('write lines with WriteToFile task'); |
13 | 13 | $I->taskWriteToFile('blogpost.md') |
14 | - ->line('****') |
|
15 | - ->line('hello world') |
|
16 | - ->line('****') |
|
17 | - ->run(); |
|
14 | + ->line('****') |
|
15 | + ->line('hello world') |
|
16 | + ->line('****') |
|
17 | + ->run(); |
|
18 | 18 | $I->seeFileFound('blogpost.md'); |
19 | 19 | $I->seeFileContentsEqual(<<<HERE |
20 | 20 | **** |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | public function appendToFile(CliGuy $I) |
29 | 29 | { |
30 | 30 | $I->taskWriteToFile('a.txt') |
31 | - ->append() |
|
32 | - ->line('hello world') |
|
33 | - ->run(); |
|
31 | + ->append() |
|
32 | + ->line('hello world') |
|
33 | + ->run(); |
|
34 | 34 | $I->seeFileFound('a.txt'); |
35 | 35 | $I->seeFileContentsEqual(<<<HERE |
36 | 36 | Ahello world |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | public function testWouldChange(CliGuy $I) |
43 | 43 | { |
44 | 44 | $writeTask = $I->taskWriteToFile('a.txt') |
45 | - ->append(); |
|
45 | + ->append(); |
|
46 | 46 | $I->assertEquals(false, $writeTask->wouldChange(), "No changes to test file."); |
47 | 47 | $writeTask->line('hello world'); |
48 | 48 | $I->assertEquals(true, $writeTask->wouldChange(), "Test file would change."); |
@@ -68,15 +68,15 @@ discard block |
||
68 | 68 | { |
69 | 69 | $I->wantTo('append lines with WriteToFile task, but only if pattern does not match'); |
70 | 70 | $I->taskWriteToFile('blogpost.md') |
71 | - ->line('****') |
|
72 | - ->line('hello world') |
|
73 | - ->line('****') |
|
74 | - ->appendUnlessMatches('/hello/', 'Should not add this') |
|
75 | - ->appendUnlessMatches('/goodbye/', 'Should add this') |
|
76 | - ->appendIfMatches('/hello/', ' and should also add this') |
|
77 | - ->appendIfMatches('/goodbye/', ' but should not add this') |
|
78 | - ->appendIfMatches('/should/', '!') |
|
79 | - ->run(); |
|
71 | + ->line('****') |
|
72 | + ->line('hello world') |
|
73 | + ->line('****') |
|
74 | + ->appendUnlessMatches('/hello/', 'Should not add this') |
|
75 | + ->appendUnlessMatches('/goodbye/', 'Should add this') |
|
76 | + ->appendIfMatches('/hello/', ' and should also add this') |
|
77 | + ->appendIfMatches('/goodbye/', ' but should not add this') |
|
78 | + ->appendIfMatches('/should/', '!') |
|
79 | + ->run(); |
|
80 | 80 | $I->seeFileFound('blogpost.md'); |
81 | 81 | $I->seeFileContentsEqual(<<<HERE |
82 | 82 | **** |
@@ -2,7 +2,7 @@ |
||
2 | 2 | $I = new CliGuy($scenario); |
3 | 3 | |
4 | 4 | $I->wantTo('flatten dir with FlattenDir task'); |
5 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
5 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
6 | 6 | $I->taskFlattenDir([ |
7 | 7 | 'some/deeply/nested/*.re' => 'flattened', |
8 | 8 | '*.txt' => 'flattened' |
@@ -2,7 +2,7 @@ |
||
2 | 2 | $I = new CliGuy($scenario); |
3 | 3 | |
4 | 4 | $I->wantTo('copy dir with CopyDir task'); |
5 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
5 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
6 | 6 | $I->taskCopyDir(['box' => 'bin']) |
7 | 7 | ->run(); |
8 | 8 | $I->seeDirFound('bin'); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | { |
5 | 5 | public function _before(CliGuy $I) |
6 | 6 | { |
7 | - $I->amInPath(codecept_data_dir().'sandbox'); |
|
7 | + $I->amInPath(codecept_data_dir() . 'sandbox'); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | public function toCreateDir(CliGuy $I) |
@@ -8,6 +8,6 @@ |
||
8 | 8 | ->run(); |
9 | 9 | $I->dontSeeFileFound('box', 'sandbox'); |
10 | 10 | $I->dontSeeFileFound('robo.txt', 'sandbox'); |
11 | -$I->dontSeeFileFound('a.txt' , 'sandbox'); |
|
11 | +$I->dontSeeFileFound('a.txt', 'sandbox'); |
|
12 | 12 | |
13 | 13 |
@@ -11,8 +11,8 @@ |
||
11 | 11 | $initialFileSize = filesize($sampleCss); |
12 | 12 | |
13 | 13 | $I->taskMinify($sampleCss) |
14 | - ->to('minifiedSample.css') |
|
15 | - ->run(); |
|
14 | + ->to('minifiedSample.css') |
|
15 | + ->run(); |
|
16 | 16 | |
17 | 17 | $I->seeFileFound($outputCss); |
18 | 18 | $minifiedFileSize = filesize($outputCss); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | $I = new CliGuy($scenario); |
4 | 4 | |
5 | 5 | $I->wantTo('minify a css file'); |
6 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
6 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
7 | 7 | |
8 | 8 | $sampleCss = dirname(__DIR__) . '/_data/sample.css'; |
9 | 9 | $outputCss = 'minifiedSample.css'; |
@@ -2,9 +2,9 @@ |
||
2 | 2 | $I = new CliGuy($scenario); |
3 | 3 | |
4 | 4 | $I->wantTo('flatten dir with FlattenDir task including parents'); |
5 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
5 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
6 | 6 | $I->taskFlattenDir('some/deeply/nested/*.re') |
7 | - ->includeParents(array(1,1)) |
|
7 | + ->includeParents(array(1, 1)) |
|
8 | 8 | ->parentDir('some') |
9 | 9 | ->to('flattened') |
10 | 10 | ->run(); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public function __construct($roboClass = null, $roboFile = null) |
45 | 45 | { |
46 | 46 | // set the const as class properties to allow overwriting in child classes |
47 | - $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS ; |
|
47 | + $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS; |
|
48 | 48 | $this->roboFile = $roboFile ? $roboFile : self::ROBOFILE; |
49 | 49 | $this->dir = getcwd(); |
50 | 50 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | require_once $roboFilePath; |
80 | 80 | |
81 | 81 | if (!class_exists($this->roboClass)) { |
82 | - $output->writeln("<error>Class ".$this->roboClass." was not loaded</error>"); |
|
82 | + $output->writeln("<error>Class " . $this->roboClass . " was not loaded</error>"); |
|
83 | 83 | return false; |
84 | 84 | } |
85 | 85 | return true; |
@@ -298,9 +298,9 @@ discard block |
||
298 | 298 | |
299 | 299 | if (substr($argv[$pos], 0, 12) == '--load-from=') { |
300 | 300 | $this->dir = substr($argv[$pos], 12); |
301 | - } elseif (isset($argv[$pos +1])) { |
|
302 | - $this->dir = $argv[$pos +1]; |
|
303 | - unset($argv[$pos +1]); |
|
301 | + } elseif (isset($argv[$pos + 1])) { |
|
302 | + $this->dir = $argv[$pos + 1]; |
|
303 | + unset($argv[$pos + 1]); |
|
304 | 304 | } |
305 | 305 | unset($argv[$pos]); |
306 | 306 | // Make adjustments if '--load-from' points at a file. |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
95 | - * @param array $argv |
|
95 | + * @param string[] $argv |
|
96 | 96 | * @param null|string $appName |
97 | 97 | * @param null|string $appVersion |
98 | 98 | * @param null|\Symfony\Component\Console\Output\OutputInterface $output |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @param null|\Symfony\Component\Console\Input\InputInterface $input |
116 | 116 | * @param null|\Symfony\Component\Console\Output\OutputInterface $output |
117 | 117 | * @param null|\Robo\Application $app |
118 | - * @param array[] $commandFiles |
|
118 | + * @param null|string $commandFiles |
|
119 | 119 | * |
120 | 120 | * @return int |
121 | 121 | */ |