@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * This file is part of the Packagist Mirror. |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * |
194 | 194 | * @return bool True if work, false otherside |
195 | 195 | */ |
196 | - protected function switch() |
|
196 | + protected function switch () |
|
197 | 197 | { |
198 | 198 | $cachedir = getenv('PUBLIC_DIR').'/'; |
199 | 199 | $packages = $cachedir.'packages.json.gz'; |
@@ -245,14 +245,14 @@ discard block |
||
245 | 245 | $this->providers = []; |
246 | 246 | $pool = new Pool($this->client, $generator, [ |
247 | 247 | 'concurrency' => getenv('MAX_CONNECTIONS'), |
248 | - 'fulfilled' => function ($response, $name) { |
|
248 | + 'fulfilled' => function($response, $name) { |
|
249 | 249 | $json = (string) $response->getBody(); |
250 | 250 | file_put_contents($name, $json); |
251 | 251 | $this->createLink($name); |
252 | 252 | $this->providers[$name] = json_decode($this->unparseGzip($json)); |
253 | 253 | $this->progressBarUpdate(); |
254 | 254 | }, |
255 | - 'rejected' => function ($reason, $name) { |
|
255 | + 'rejected' => function($reason, $name) { |
|
256 | 256 | $this->errors[$name] = $reason; |
257 | 257 | $this->progressBarUpdate(); |
258 | 258 | }, |
@@ -399,14 +399,14 @@ discard block |
||
399 | 399 | |
400 | 400 | $pool = new Pool($this->client, $generator, [ |
401 | 401 | 'concurrency' => getenv('MAX_CONNECTIONS'), |
402 | - 'fulfilled' => function ($response, $name) { |
|
402 | + 'fulfilled' => function($response, $name) { |
|
403 | 403 | $gzip = (string) $response->getBody(); |
404 | 404 | file_put_contents($name, $this->parseGzip($gzip)); |
405 | 405 | $this->createLink($name); |
406 | 406 | $this->packages[] = dirname($name); |
407 | 407 | $this->progressBarUpdate(); |
408 | 408 | }, |
409 | - 'rejected' => function ($reason, $name) { |
|
409 | + 'rejected' => function($reason, $name) { |
|
410 | 410 | $this->errors[$name] = $reason; |
411 | 411 | $this->progressBarUpdate(); |
412 | 412 | }, |
@@ -474,14 +474,14 @@ discard block |
||
474 | 474 | |
475 | 475 | $pool = new Pool($this->client, $generator, [ |
476 | 476 | 'concurrency' => getenv('MAX_CONNECTIONS') * $this->circular->count(), |
477 | - 'fulfilled' => function ($response, $name) { |
|
477 | + 'fulfilled' => function($response, $name) { |
|
478 | 478 | $gzip = (string) $response->getBody(); |
479 | 479 | file_put_contents($name, $this->parseGzip($gzip)); |
480 | 480 | $this->createLink($name); |
481 | 481 | $this->packages[] = dirname($name); |
482 | 482 | $this->progressBarUpdate(); |
483 | 483 | }, |
484 | - 'rejected' => function ($reason, $name) { |
|
484 | + 'rejected' => function($reason, $name) { |
|
485 | 485 | $this->errors[$name] = $reason; |
486 | 486 | $this->progressBarUpdate(); |
487 | 487 | }, |