@@ -35,7 +35,7 @@ |
||
35 | 35 | $this->assertTrue($collection->has('object')); |
36 | 36 | $this->assertEquals($object, $collection->get('object')); |
37 | 37 | |
38 | - $this->assertEquals(['object' => $object], $collection->select(function ($value, $key) use ($object) { |
|
38 | + $this->assertEquals(['object' => $object], $collection->select(function($value, $key) use ($object) { |
|
39 | 39 | return $value === $object && $key === 'object'; |
40 | 40 | })); |
41 | 41 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | ->expects(self::exactly(1)) |
29 | 29 | ->method('callback'); |
30 | 30 | |
31 | - $task = new Task('task_name', function () use ($mock) { |
|
31 | + $task = new Task('task_name', function() use ($mock) { |
|
32 | 32 | $mock->callback(); |
33 | 33 | }); |
34 | 34 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $mock2 |
74 | 74 | ->expects(self::once()) |
75 | 75 | ->method('callback'); |
76 | - $task2 = new Task('task2', function () use ($mock2) { |
|
76 | + $task2 = new Task('task2', function() use ($mock2) { |
|
77 | 77 | $mock2->callback(); |
78 | 78 | }); |
79 | 79 | $task2->run($context); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | task('bar', $spy); |
93 | 93 | task('group', ['foo', 'bar']); |
94 | 94 | |
95 | - (new Task('group:invoke', function () { |
|
95 | + (new Task('group:invoke', function() { |
|
96 | 96 | invoke('group'); |
97 | 97 | }))->run(new Context(new Host('localhost'))); |
98 | 98 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | $config = new Configuration(); |
30 | 30 | $config->set('opt', true); |
31 | - $config->set('fn', function () { |
|
31 | + $config->set('fn', function() { |
|
32 | 32 | return 'func'; |
33 | 33 | }); |
34 | 34 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | public function testGetFromCallback() |
104 | 104 | { |
105 | 105 | $config = new Configuration(); |
106 | - $config->set('func', function () { |
|
106 | + $config->set('func', function() { |
|
107 | 107 | return 'param'; |
108 | 108 | }); |
109 | 109 | self::assertEquals('param', $config['func']); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $parent = new Configuration(); |
151 | 151 | $alpha = new Configuration($parent); |
152 | 152 | |
153 | - $parent->set('files', function () { |
|
153 | + $parent->set('files', function() { |
|
154 | 154 | return ['a', 'b']; |
155 | 155 | }); |
156 | 156 | $alpha->add('files', ['c']); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $alpha = new Configuration($parent); |
165 | 165 | |
166 | 166 | $parent->set('global', 'do not include'); |
167 | - $alpha->set('whoami', function () { |
|
167 | + $alpha->set('whoami', function() { |
|
168 | 168 | $this->fail('should not be called'); |
169 | 169 | }); |
170 | 170 | $alpha->set('name', 'alpha'); |
@@ -6,8 +6,8 @@ |
||
6 | 6 | localhost('beta')->setLabels(['env' => 'dev']); |
7 | 7 | localhost('dev')->setLabels(['env' => 'dev']); |
8 | 8 | |
9 | -task('test', function () { |
|
10 | - on(select('env=dev'), function () { |
|
9 | +task('test', function() { |
|
10 | + on(select('env=dev'), function() { |
|
11 | 11 | info('executing on {{alias}}'); |
12 | 12 | }); |
13 | 13 | }); |
@@ -4,6 +4,6 @@ |
||
4 | 4 | |
5 | 5 | require __DIR__ . '/deploy.php'; |
6 | 6 | |
7 | -task('deploy:update_code', function () { |
|
7 | +task('deploy:update_code', function() { |
|
8 | 8 | upload(__FIXTURES__ . '/project/', '{{release_path}}'); |
9 | 9 | }); |
@@ -5,6 +5,6 @@ |
||
5 | 5 | localhost('prod'); |
6 | 6 | localhost('beta'); |
7 | 7 | |
8 | -task('test_once', function () { |
|
8 | +task('test_once', function() { |
|
9 | 9 | writeln('SHOULD BE ONCE'); |
10 | 10 | })->once(); |
@@ -11,6 +11,6 @@ |
||
11 | 11 | localhost('group_b_2') |
12 | 12 | ->setLabels(['node' => 'anna']); |
13 | 13 | |
14 | -task('test_once_per_node', function () { |
|
14 | +task('test_once_per_node', function() { |
|
15 | 15 | writeln('alias: {{alias}} hostname: {{hostname}}'); |
16 | 16 | })->oncePerNode(); |
@@ -120,7 +120,7 @@ |
||
120 | 120 | |
121 | 121 | usort( |
122 | 122 | $updates, |
123 | - function (Update $a, Update $b) { |
|
123 | + function(Update $a, Update $b) { |
|
124 | 124 | return Comparator::isGreaterThan( |
125 | 125 | $a->getVersion(), |
126 | 126 | $b->getVersion(), |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $dealersHand = []; |
81 | 81 | $playersHand = []; |
82 | 82 | shuffle($deck); |
83 | - $deal = function () use (&$deck, &$graveyard) { |
|
83 | + $deal = function() use (&$deck, &$graveyard) { |
|
84 | 84 | if (count($deck) == 0) { |
85 | 85 | shuffle($graveyard); |
86 | 86 | $deck = $graveyard; |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | } |
288 | 288 | $variants = [$value]; |
289 | 289 | while ($aces-- > 0) { |
290 | - $variants = array_flatten(array_map(function ($v) { |
|
290 | + $variants = array_flatten(array_map(function($v) { |
|
291 | 291 | return [$v + 1, $v + 11]; |
292 | 292 | }, $variants)); |
293 | 293 | } |