@@ -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 | ) |
@@ -23,27 +23,27 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | if (isset($version)) { |
30 | 30 | $project = array_map( |
31 | - function ($item) use ($version) { |
|
31 | + function($item) use ($version) { |
|
32 | 32 | return "$item:$version"; |
33 | 33 | }, |
34 | 34 | $project |
@@ -2,7 +2,7 @@ |
||
2 | 2 | $I = new CliGuy($scenario); |
3 | 3 | |
4 | 4 | $I->wantTo('copy dir recursively with CopyDir task, but exclude a file'); |
5 | -$I->amInPath(codecept_data_dir().'sandbox'); |
|
5 | +$I->amInPath(codecept_data_dir() . 'sandbox'); |
|
6 | 6 | $I->seeDirFound('some/deeply/nested'); |
7 | 7 | $I->seeDirFound('some/deeply/nested2'); |
8 | 8 | $I->seeDirFound('some/deeply/nested3'); |
@@ -235,7 +235,7 @@ |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | $this->version = array_intersect_key($matches, $this->version); |
238 | - $this->version = array_map(function ($item) { |
|
238 | + $this->version = array_map(function($item) { |
|
239 | 239 | return $item[0]; |
240 | 240 | }, $this->version); |
241 | 241 | } |
@@ -73,9 +73,9 @@ |
||
73 | 73 | */ |
74 | 74 | private static function getClassKey($key) |
75 | 75 | { |
76 | - $configPrefix = static::configPrefix(); // task. |
|
77 | - $configClass = static::configClassIdentifier(get_called_class()); // PARTIAL_NAMESPACE.CLASSNAME |
|
78 | - $configPostFix = static::configPostfix(); // .settings |
|
76 | + $configPrefix = static::configPrefix(); // task. |
|
77 | + $configClass = static::configClassIdentifier(get_called_class()); // PARTIAL_NAMESPACE.CLASSNAME |
|
78 | + $configPostFix = static::configPostfix(); // .settings |
|
79 | 79 | |
80 | 80 | return sprintf('%s%s%s.%s', $configPrefix, $configClass, $configPostFix, $key); |
81 | 81 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function __construct($roboClass = null, $roboFile = null) |
48 | 48 | { |
49 | 49 | // set the const as class properties to allow overwriting in child classes |
50 | - $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS ; |
|
50 | + $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS; |
|
51 | 51 | $this->roboFile = $roboFile ? $roboFile : self::ROBOFILE; |
52 | 52 | $this->dir = getcwd(); |
53 | 53 | } |
@@ -371,9 +371,9 @@ discard block |
||
371 | 371 | |
372 | 372 | if (substr($argv[$pos], 0, 12) == '--load-from=') { |
373 | 373 | $this->dir = substr($argv[$pos], 12); |
374 | - } elseif (isset($argv[$pos +1])) { |
|
375 | - $this->dir = $argv[$pos +1]; |
|
376 | - unset($argv[$pos +1]); |
|
374 | + } elseif (isset($argv[$pos + 1])) { |
|
375 | + $this->dir = $argv[$pos + 1]; |
|
376 | + unset($argv[$pos + 1]); |
|
377 | 377 | } |
378 | 378 | unset($argv[$pos]); |
379 | 379 | // Make adjustments if '--load-from' points at a file. |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'http' => [ |
56 | 56 | 'method' => 'GET', |
57 | 57 | 'header' => [ |
58 | - 'User-Agent: ' . $this->applicationName . ' (' . $this->gitHubRepository . ')' . ' Self-Update (PHP)' |
|
58 | + 'User-Agent: ' . $this->applicationName . ' (' . $this->gitHubRepository . ')' . ' Self-Update (PHP)' |
|
59 | 59 | ] |
60 | 60 | ] |
61 | 61 | ]; |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | $releases = file_get_contents('https://api.github.com/repos/' . $this->gitHubRepository . '/releases', false, $context); |
66 | 66 | $releases = json_decode($releases); |
67 | 67 | |
68 | - if (! isset($releases[0])) { |
|
68 | + if (!isset($releases[0])) { |
|
69 | 69 | throw new \Exception('API error - no release found at GitHub repository ' . $this->gitHubRepository); |
70 | 70 | } |
71 | 71 | |
72 | 72 | $version = $releases[0]->tag_name; |
73 | 73 | $url = $releases[0]->assets[0]->browser_download_url; |
74 | 74 | |
75 | - return [ $version, $url ]; |
|
75 | + return [$version, $url]; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -89,20 +89,20 @@ discard block |
||
89 | 89 | $tempFilename = dirname($localFilename) . '/' . basename($localFilename, '.phar') . '-temp.phar'; |
90 | 90 | |
91 | 91 | // check for permissions in local filesystem before start connection process |
92 | - if (! is_writable($tempDirectory = dirname($tempFilename))) { |
|
92 | + if (!is_writable($tempDirectory = dirname($tempFilename))) { |
|
93 | 93 | throw new \Exception( |
94 | 94 | $programName . ' update failed: the "' . $tempDirectory . |
95 | 95 | '" directory used to download the temp file could not be written' |
96 | 96 | ); |
97 | 97 | } |
98 | 98 | |
99 | - if (! is_writable($localFilename)) { |
|
99 | + if (!is_writable($localFilename)) { |
|
100 | 100 | throw new \Exception( |
101 | 101 | $programName . ' update failed: the "' . $localFilename . '" file could not be written (execute with sudo)' |
102 | 102 | ); |
103 | 103 | } |
104 | 104 | |
105 | - list( $latest, $downloadUrl ) = $this->getLatestReleaseFromGithub(); |
|
105 | + list($latest, $downloadUrl) = $this->getLatestReleaseFromGithub(); |
|
106 | 106 | |
107 | 107 | |
108 | 108 | if ($this->currentVersion == $latest) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $this->_exit(); |
132 | 132 | } catch (\Exception $e) { |
133 | 133 | @unlink($tempFilename); |
134 | - if (! $e instanceof \UnexpectedValueException && ! $e instanceof \PharException) { |
|
134 | + if (!$e instanceof \UnexpectedValueException && !$e instanceof \PharException) { |
|
135 | 135 | throw $e; |
136 | 136 | } |
137 | 137 | $output->writeln('<error>The download is corrupted (' . $e->getMessage() . ').</error>'); |