@@ -36,7 +36,7 @@ |
||
36 | 36 | { |
37 | 37 | if (!static::$collection) { |
38 | 38 | static::$collection = \Robo\Robo::getContainer()->get('collection'); |
39 | - register_shutdown_function(function () { |
|
39 | + register_shutdown_function(function() { |
|
40 | 40 | static::complete(); |
41 | 41 | }); |
42 | 42 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | public function call(callable $fn) |
60 | 60 | { |
61 | 61 | return $this->withEachKeyValueCall( |
62 | - function ($key, $value) use ($fn) { |
|
62 | + function($key, $value) use ($fn) { |
|
63 | 63 | return call_user_func($fn, $value); |
64 | 64 | } |
65 | 65 | ); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function withBuilder(callable $fn) |
69 | 69 | { |
70 | 70 | $this->countingStack[] = |
71 | - function ($key, $value) use ($fn) { |
|
71 | + function($key, $value) use ($fn) { |
|
72 | 72 | // Create a new builder for every iteration |
73 | 73 | $builder = $this->collectionBuilder(); |
74 | 74 | // The user function should build task operations using |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | return $builder->getCollection()->progressIndicatorSteps(); |
79 | 79 | }; |
80 | 80 | return $this->withEachKeyValueCall( |
81 | - function ($key, $value) use ($fn) { |
|
81 | + function($key, $value) use ($fn) { |
|
82 | 82 | // Create a new builder for every iteration |
83 | 83 | $builder = $this->collectionBuilder() |
84 | 84 | ->setParentCollection($this->parentCollection); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | { |
108 | 108 | $collection = $this; |
109 | 109 | $completionRegistrationTask = new CallableTask( |
110 | - function () use ($collection, $completionTask) { |
|
110 | + function() use ($collection, $completionTask) { |
|
111 | 111 | |
112 | 112 | $collection->registerCompletion($completionTask); |
113 | 113 | }, |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $context += ['name' => 'Progress']; |
151 | 151 | $context += TaskInfo::getTaskContext($this); |
152 | 152 | return $this->addCode( |
153 | - function () use ($level, $text, $context) { |
|
153 | + function() use ($level, $text, $context) { |
|
154 | 154 | $this->printTaskOutput($level, $text, $context); |
155 | 155 | } |
156 | 156 | ); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | { |
161 | 161 | $collection = $this; |
162 | 162 | $rollbackRegistrationTask = new CallableTask( |
163 | - function () use ($collection, $rollbackTask) { |
|
163 | + function() use ($collection, $rollbackTask) { |
|
164 | 164 | $collection->registerRollback($rollbackTask); |
165 | 165 | }, |
166 | 166 | $this |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | if ($task instanceof StackBasedTask) { |
203 | 203 | $task->stopOnFail(false); |
204 | 204 | } |
205 | - $ignoreErrorsInTask = function () use ($task) { |
|
205 | + $ignoreErrorsInTask = function() use ($task) { |
|
206 | 206 | $data = []; |
207 | 207 | try { |
208 | 208 | $result = $this->runSubtask($task); |
@@ -55,11 +55,11 @@ |
||
55 | 55 | Robo::setContainer($container); |
56 | 56 | $this->setContainer($container); |
57 | 57 | |
58 | - $this->getModule('Filesystem')->copyDir(codecept_data_dir().'claypit', codecept_data_dir().'sandbox'); |
|
58 | + $this->getModule('Filesystem')->copyDir(codecept_data_dir() . 'claypit', codecept_data_dir() . 'sandbox'); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function _after(\Codeception\TestCase $test) { |
62 | - $this->getModule('Filesystem')->deleteDir(codecept_data_dir().'sandbox'); |
|
62 | + $this->getModule('Filesystem')->deleteDir(codecept_data_dir() . 'sandbox'); |
|
63 | 63 | $this->getContainer()->add('output', new ConsoleOutput()); |
64 | 64 | chdir(codecept_root_dir()); |
65 | 65 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | ->extensions('php') // single string value of List |
38 | 38 | ->exclude(array('test', 'tmp')) // array value of Traversable |
39 | 39 | ->skipDocPath($skippedPaths) // multi-value of Traversable |
40 | - ->charset(array('utf8','iso88591')) // array of List |
|
40 | + ->charset(array('utf8', 'iso88591')) // array of List |
|
41 | 41 | ->internal('no') // boolean as supported "no" |
42 | 42 | ->php(true) // boolean as boolean |
43 | 43 | ->tree('Y') // boolean as string |
@@ -30,27 +30,27 @@ discard block |
||
30 | 30 | public function testGulpGetCommand() |
31 | 31 | { |
32 | 32 | verify( |
33 | - (new \Robo\Task\Gulp\Run('default','gulp'))->getCommand() |
|
33 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->getCommand() |
|
34 | 34 | )->equals($this->adjustQuotes('gulp "default"')); |
35 | 35 | |
36 | 36 | verify( |
37 | - (new \Robo\Task\Gulp\Run('another','gulp'))->getCommand() |
|
37 | + (new \Robo\Task\Gulp\Run('another', 'gulp'))->getCommand() |
|
38 | 38 | )->equals($this->adjustQuotes('gulp "another"')); |
39 | 39 | |
40 | 40 | verify( |
41 | - (new \Robo\Task\Gulp\Run('default','gulp'))->silent()->getCommand() |
|
41 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->silent()->getCommand() |
|
42 | 42 | )->equals($this->adjustQuotes('gulp "default" --silent')); |
43 | 43 | |
44 | 44 | verify( |
45 | - (new \Robo\Task\Gulp\Run('default','gulp'))->noColor()->getCommand() |
|
45 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->noColor()->getCommand() |
|
46 | 46 | )->equals($this->adjustQuotes('gulp "default" --no-color')); |
47 | 47 | |
48 | 48 | verify( |
49 | - (new \Robo\Task\Gulp\Run('default','gulp'))->color()->getCommand() |
|
49 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->color()->getCommand() |
|
50 | 50 | )->equals($this->adjustQuotes('gulp "default" --color')); |
51 | 51 | |
52 | 52 | verify( |
53 | - (new \Robo\Task\Gulp\Run('default','gulp'))->simple()->getCommand() |
|
53 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple()->getCommand() |
|
54 | 54 | )->equals($this->adjustQuotes('gulp "default" --tasks-simple')); |
55 | 55 | } |
56 | 56 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | $gulp = test::double('Robo\Task\Gulp\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
60 | 60 | |
61 | - $task = (new \Robo\Task\Gulp\Run('default','gulp'))->simple(); |
|
61 | + $task = (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple(); |
|
62 | 62 | verify($task->getCommand())->equals($this->adjustQuotes('gulp "default" --tasks-simple')); |
63 | 63 | $task->run(); |
64 | 64 | $gulp->verifyInvoked('executeCommand', [$this->adjustQuotes('gulp "default" --tasks-simple')]); |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | if ($isWindows) { |
72 | 72 | |
73 | 73 | verify( |
74 | - (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand() |
|
74 | + (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand() |
|
75 | 75 | )->equals('gulp "anotherWith weired!(\"\') Chars"'); |
76 | 76 | |
77 | 77 | } else { |
78 | 78 | |
79 | 79 | verify( |
80 | - (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand() |
|
80 | + (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand() |
|
81 | 81 | )->equals("gulp 'anotherWith weired!(\"'\\'') Chars'"); |
82 | 82 | |
83 | 83 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | // tests |
22 | 22 | public function testBowerInstall() |
23 | 23 | { |
24 | - $bower = test::double('Robo\Task\Bower\Install', ['executeCommand' => null, 'logger' => new \Psr\Log\NullLogger(),]); |
|
24 | + $bower = test::double('Robo\Task\Bower\Install', ['executeCommand' => null, 'logger' => new \Psr\Log\NullLogger(), ]); |
|
25 | 25 | (new \Robo\Task\Bower\Install('bower'))->run(); |
26 | 26 | $bower->verifyInvoked('executeCommand', ['bower install']); |
27 | 27 | } |
@@ -103,11 +103,11 @@ |
||
103 | 103 | ->completion($completion1) |
104 | 104 | ->rollbackCode(function() use($rollback1) { $rollback1->run(); } ) |
105 | 105 | ->completionCode(function() use($completion1) { $completion1->run(); } ) |
106 | - ->addCode(function () { return 42; }) |
|
106 | + ->addCode(function() { return 42; }) |
|
107 | 107 | ->progressMessage("not reached") |
108 | 108 | ->rollback($rollback2) |
109 | 109 | ->completion($completion2) |
110 | - ->addCode(function () { return 13; }); |
|
110 | + ->addCode(function() { return 13; }); |
|
111 | 111 | |
112 | 112 | $collection->setLogger($this->guy->logger()); |
113 | 113 |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | $message = $argv[1]; |
4 | 4 | $iterations = $argv[2]; |
5 | -for ($i=0; $i < $iterations; ++$i) { |
|
5 | +for ($i = 0; $i < $iterations; ++$i) { |
|
6 | 6 | print "$message\n"; |
7 | 7 | sleep(1); |
8 | 8 | } |