@@ -40,7 +40,7 @@ |
||
40 | 40 | public function start() |
41 | 41 | { |
42 | 42 | $this->loop = React\EventLoop\Factory::create(); |
43 | - $server = new React\Http\Server($this->loop, function (ServerRequestInterface $request) { |
|
43 | + $server = new React\Http\Server($this->loop, function(ServerRequestInterface $request) { |
|
44 | 44 | try { |
45 | 45 | return $this->router($request); |
46 | 46 | } catch (Throwable $exception) { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | function spinner($message = '') |
25 | 25 | { |
26 | - $frame = FRAMES[(int)(microtime(true) * 10) % count(FRAMES)]; |
|
26 | + $frame = FRAMES[(int) (microtime(true) * 10) % count(FRAMES)]; |
|
27 | 27 | return " $frame $message\r"; |
28 | 28 | } |
29 | 29 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $plan || $this->server->start(); |
65 | 65 | $plan || $this->connect($hosts); |
66 | 66 | |
67 | - $globalLimit = (int)$this->input->getOption('limit') ?: count($hosts); |
|
67 | + $globalLimit = (int) $this->input->getOption('limit') ?: count($hosts); |
|
68 | 68 | |
69 | 69 | foreach ($tasks as $task) { |
70 | 70 | $plan || $this->messenger->startTask($task); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | private function connect(array $hosts) |
143 | 143 | { |
144 | - $callback = function (string $output) { |
|
144 | + $callback = function(string $output) { |
|
145 | 145 | $output = preg_replace('/\n$/', '', $output); |
146 | 146 | if (strlen($output) !== 0) { |
147 | 147 | $this->output->writeln($output); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | return 0; |
193 | 193 | } |
194 | 194 | |
195 | - $callback = function (string $output) { |
|
195 | + $callback = function(string $output) { |
|
196 | 196 | $output = preg_replace('/\n$/', '', $output); |
197 | 197 | if (strlen($output) !== 0) { |
198 | 198 | $this->output->writeln($output); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | /** @var Process[] $processes */ |
203 | 203 | $processes = []; |
204 | 204 | |
205 | - $this->server->addTimer(0, function () use(&$processes, $hosts, $task) { |
|
205 | + $this->server->addTimer(0, function() use(&$processes, $hosts, $task) { |
|
206 | 206 | foreach ($hosts as $host) { |
207 | 207 | $processes[] = $this->createProcess($host, $task); |
208 | 208 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | } |
213 | 213 | }); |
214 | 214 | |
215 | - $this->server->addPeriodicTimer(0.03, function ($timer) use (&$processes, $callback) { |
|
215 | + $this->server->addPeriodicTimer(0.03, function($timer) use (&$processes, $callback) { |
|
216 | 216 | $this->gatherOutput($processes, $callback); |
217 | 217 | $this->output->write(spinner()); |
218 | 218 | if ($this->allFinished($processes)) { |
@@ -14,16 +14,16 @@ discard block |
||
14 | 14 | set('writable_dirs', ['var']); |
15 | 15 | set('migrations_config', ''); |
16 | 16 | |
17 | -set('bin/console', function () { |
|
17 | +set('bin/console', function() { |
|
18 | 18 | return parse('{{release_path}}/bin/console'); |
19 | 19 | }); |
20 | 20 | |
21 | -set('console_options', function () { |
|
21 | +set('console_options', function() { |
|
22 | 22 | return '--no-interaction'; |
23 | 23 | }); |
24 | 24 | |
25 | 25 | desc('Migrate database'); |
26 | -task('database:migrate', function () { |
|
26 | +task('database:migrate', function() { |
|
27 | 27 | $options = '--allow-no-migration'; |
28 | 28 | if (get('migrations_config') !== '') { |
29 | 29 | $options = sprintf('%s --configuration={{release_path}}/{{migrations_config}}', $options); |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | }); |
34 | 34 | |
35 | 35 | desc('Clear cache'); |
36 | -task('deploy:cache:clear', function () { |
|
36 | +task('deploy:cache:clear', function() { |
|
37 | 37 | run('{{bin/php}} {{bin/console}} cache:clear {{console_options}} --no-warmup'); |
38 | 38 | }); |
39 | 39 | |
40 | 40 | desc('Warm up cache'); |
41 | -task('deploy:cache:warmup', function () { |
|
41 | +task('deploy:cache:warmup', function() { |
|
42 | 42 | run('{{bin/php}} {{bin/console}} cache:warmup {{console_options}}'); |
43 | 43 | }); |
44 | 44 |