@@ -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 |
@@ -42,9 +42,12 @@ |
||
42 | 42 | <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> |
43 | 43 | <?php if (null !== $lastSync): ?> |
44 | 44 | <p>Last sync: <span id="lastsynced"><?= $lastSync; ?></span> (Synchronized every <?= $synced ?> seconds)</p> |
45 | - <?php else: ?> |
|
45 | + <?php else { |
|
46 | + : ?> |
|
46 | 47 | <p>Synchronized every 1 minute</p> |
47 | - <?php endif; ?> |
|
48 | + <?php endif; |
|
49 | +} |
|
50 | +?> |
|
48 | 51 | </div> |
49 | 52 | <p> |
50 | 53 | This is PHP package repository Packagist.org mirror site. |
@@ -243,7 +243,7 @@ |
||
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 |