@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | return $this; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - if (strpos($link, 'vfs://') !== false){ |
|
| 193 | + if (strpos($link, 'vfs://') !== false) { |
|
| 194 | 194 | return $this; |
| 195 | 195 | } |
| 196 | 196 | |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | $this->delete($target); |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | - retry(8, function () use ($from, $target) { |
|
| 246 | + retry(8, function() use ($from, $target) { |
|
| 247 | 247 | $this->filesystem->rename($this->getGzName($from), $target); |
| 248 | 248 | }, 250); |
| 249 | 249 | |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | */ |
| 107 | 107 | protected function flushProviders():Clean |
| 108 | 108 | { |
| 109 | - if (!$this->filesystem->hasFile(self::MAIN)){ |
|
| 109 | + if (!$this->filesystem->hasFile(self::MAIN)) { |
|
| 110 | 110 | return $this; |
| 111 | 111 | } |
| 112 | 112 | |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | */ |
| 126 | 126 | public function init(InputInterface $input, OutputInterface $output) |
| 127 | 127 | { |
| 128 | - if(isset($this->input) && isset($this->output)){ |
|
| 128 | + if (isset($this->input) && isset($this->output)) { |
|
| 129 | 129 | return $this; |
| 130 | 130 | } |
| 131 | 131 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | $this->progressBar->start(count($this->providerIncludes)); |
| 190 | 190 | |
| 191 | - $success = function ($body, $path) { |
|
| 191 | + $success = function($body, $path) { |
|
| 192 | 192 | $this->provider->setDownloaded($path); |
| 193 | 193 | $this->filesystem->write($path, $body); |
| 194 | 194 | }; |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | $this->http->pool( |
| 316 | 316 | $generator, |
| 317 | 317 | // Success |
| 318 | - function ($body, $path) { |
|
| 318 | + function($body, $path) { |
|
| 319 | 319 | $this->filesystem->write($path, $body); |
| 320 | 320 | $this->package->setDownloaded($path); |
| 321 | 321 | }, |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | */ |
| 332 | 332 | protected function getClosureComplete():Closure |
| 333 | 333 | { |
| 334 | - return function () { |
|
| 334 | + return function() { |
|
| 335 | 335 | $this->progressBar->progress(); |
| 336 | 336 | }; |
| 337 | 337 | } |
@@ -150,13 +150,13 @@ |
||
| 150 | 150 | $this->connections = $this->maxConnections * $mirrors; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - $fulfilled = function ($response, $path) use ($success, $complete) { |
|
| 153 | + $fulfilled = function($response, $path) use ($success, $complete) { |
|
| 154 | 154 | $body = (string) $response->getBody(); |
| 155 | 155 | $success($body, $path); |
| 156 | 156 | $complete(); |
| 157 | 157 | }; |
| 158 | 158 | |
| 159 | - $rejected = function ($reason, $path) use ($complete) { |
|
| 159 | + $rejected = function($reason, $path) use ($complete) { |
|
| 160 | 160 | $uri = $reason->getRequest()->getUri(); |
| 161 | 161 | $host = $uri->getScheme().'://'.$uri->getHost(); |
| 162 | 162 | |
@@ -40,9 +40,12 @@ |
||
| 40 | 40 | <h1>Packagist Mirror <img src="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/<?= $countryCode; ?>.svg" title="<?= $countryName; ?>" alt="<?= $countryName; ?>"/></h1> |
| 41 | 41 | <?php if (null !== $lastSync): ?> |
| 42 | 42 | <p>Last sync: <?= $lastSync; ?> (Synchronized every 1 minute)</p> |
| 43 | - <?php else: ?> |
|
| 43 | + <?php else { |
|
| 44 | + : ?> |
|
| 44 | 45 | <p>Synchronized every 1 minute</p> |
| 45 | - <?php endif; ?> |
|
| 46 | + <?php endif; |
|
| 47 | +} |
|
| 48 | +?> |
|
| 46 | 49 | </div> |
| 47 | 50 | <p> |
| 48 | 51 | This is PHP package repository Packagist.org mirror site. |