@@ -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 | |
@@ -174,7 +174,9 @@ |
||
| 174 | 174 | { |
| 175 | 175 | $from = getcwd().'/resources/public/'; |
| 176 | 176 | foreach (new \DirectoryIterator($from) as $fileInfo) { |
| 177 | - if($fileInfo->isDot()) continue; |
|
| 177 | + if($fileInfo->isDot()) { |
|
| 178 | + continue; |
|
| 179 | + } |
|
| 178 | 180 | $file = $fileInfo->getFilename(); |
| 179 | 181 | $to = $this->filesystem->getFullPath($file); |
| 180 | 182 | copy($from.$file, $to); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $this->filesystem->move(self::DOT); |
| 108 | 108 | |
| 109 | 109 | // Clean |
| 110 | - if(!$this->input->getOption('no-clean')){ |
|
| 110 | + if (!$this->input->getOption('no-clean')) { |
|
| 111 | 111 | $this->setExitCode($this->clean->execute($input, $output)); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | { |
| 204 | 204 | $from = getcwd().'/resources/public/'; |
| 205 | 205 | foreach (new \DirectoryIterator($from) as $fileInfo) { |
| 206 | - if($fileInfo->isDot()) continue; |
|
| 206 | + if ($fileInfo->isDot()) continue; |
|
| 207 | 207 | $file = $fileInfo->getFilename(); |
| 208 | 208 | $to = $this->filesystem->getFullPath($file); |
| 209 | 209 | copy($from.$file, $to); |
@@ -241,14 +241,14 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | $this->progressBar->start(count($this->providerIncludes)); |
| 243 | 243 | |
| 244 | - $success = function ($body, $path) { |
|
| 244 | + $success = function($body, $path) { |
|
| 245 | 245 | $this->provider->setDownloaded($path); |
| 246 | 246 | $this->filesystem->write($path, $body); |
| 247 | 247 | }; |
| 248 | 248 | |
| 249 | 249 | $this->http->pool($generator, $success, $this->getClosureComplete()); |
| 250 | 250 | $this->progressBar->end(); |
| 251 | - if(!$this->progressBar->isDisabled()){ |
|
| 251 | + if (!$this->progressBar->isDisabled()) { |
|
| 252 | 252 | $this->output->write(PHP_EOL); |
| 253 | 253 | } |
| 254 | 254 | $this->showErrors(); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | ]; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | - if(!count($rows)){ |
|
| 294 | + if (!count($rows)) { |
|
| 295 | 295 | return $this; |
| 296 | 296 | } |
| 297 | 297 | |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | $mirrors = $this->http->getMirror()->toArray(); |
| 312 | 312 | |
| 313 | 313 | foreach ($mirrors as $mirror) { |
| 314 | - if(empty($mirror)){ |
|
| 314 | + if (empty($mirror)) { |
|
| 315 | 315 | continue; |
| 316 | 316 | } |
| 317 | 317 | |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | $base = $uri['scheme'].'://'.$uri['host']; |
| 320 | 320 | $total = $this->http->getTotalErrorByMirror($base); |
| 321 | 321 | |
| 322 | - if(!isset($this->latestErrorsShowed[$base])){ |
|
| 322 | + if (!isset($this->latestErrorsShowed[$base])) { |
|
| 323 | 323 | $this->latestErrorsShowed[$base] = 0; |
| 324 | 324 | } |
| 325 | 325 | |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | if ($this->isVeryVerbose() && $total > 1) { |
| 330 | 330 | //print_r($this->latestErrorsShowed); |
| 331 | 331 | //print($base.PHP_EOL); |
| 332 | - if($this->latestErrorsShowed[$base] == $total){ |
|
| 332 | + if ($this->latestErrorsShowed[$base] == $total) { |
|
| 333 | 333 | continue; |
| 334 | 334 | } |
| 335 | 335 | |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | $this->progressBar->start(count($this->providerPackages)); |
| 385 | 385 | $this->poolPackages($generator); |
| 386 | 386 | $this->progressBar->end(); |
| 387 | - if(!$this->progressBar->isDisabled()){ |
|
| 387 | + if (!$this->progressBar->isDisabled()) { |
|
| 388 | 388 | $this->output->write(PHP_EOL); |
| 389 | 389 | } |
| 390 | 390 | $this->showErrors()->disableDueErrors()->fallback(); |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | $this->http->pool( |
| 404 | 404 | $generator, |
| 405 | 405 | // Success |
| 406 | - function ($body, $path) { |
|
| 406 | + function($body, $path) { |
|
| 407 | 407 | $this->filesystem->write($path, $body); |
| 408 | 408 | $this->package->setDownloaded($path); |
| 409 | 409 | }, |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | */ |
| 420 | 420 | protected function getClosureComplete():Closure |
| 421 | 421 | { |
| 422 | - return function () { |
|
| 422 | + return function() { |
|
| 423 | 423 | $this->progressBar->progress(); |
| 424 | 424 | }; |
| 425 | 425 | } |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | $this->progressBar->start($total); |
| 450 | 450 | $this->poolPackages($generator); |
| 451 | 451 | $this->progressBar->end(); |
| 452 | - if(!$this->progressBar->isDisabled()){ |
|
| 452 | + if (!$this->progressBar->isDisabled()) { |
|
| 453 | 453 | $this->output->write(PHP_EOL); |
| 454 | 454 | } |
| 455 | 455 | $this->showErrors(); |
@@ -160,7 +160,7 @@ |
||
| 160 | 160 | $this->progressBar->start(count($list)); |
| 161 | 161 | $this->flushPackage(array_keys($list)); |
| 162 | 162 | $this->progressBar->end(); |
| 163 | - if(!$this->progressBar->isDisabled()){ |
|
| 163 | + if (!$this->progressBar->isDisabled()) { |
|
| 164 | 164 | $this->output->write(PHP_EOL); |
| 165 | 165 | } |
| 166 | 166 | $this->showRemoved(); |
@@ -38,9 +38,9 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | </style> |
| 40 | 40 | |
| 41 | - <?php if(!empty($googleAnalyticsMainId) || !empty($googleAnalyticsId)) {?> |
|
| 41 | + <?php if (!empty($googleAnalyticsMainId) || !empty($googleAnalyticsId)) {?> |
|
| 42 | 42 | <!-- Global site tag (gtag.js) - Google Analytics --> |
| 43 | - <script async src="https://www.googletagmanager.com/gtag/js?id=<?=$googleAnalyticsMainId?:$googleAnalyticsId?>"></script> |
|
| 43 | + <script async src="https://www.googletagmanager.com/gtag/js?id=<?=$googleAnalyticsMainId ?: $googleAnalyticsId?>"></script> |
|
| 44 | 44 | <script> |
| 45 | 45 | window.dataLayer = window.dataLayer || []; |
| 46 | 46 | |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | gtag('js', new Date()); |
| 52 | 52 | |
| 53 | - <?php if(!empty($googleAnalyticsMainId)) {?> |
|
| 53 | + <?php if (!empty($googleAnalyticsMainId)) {?> |
|
| 54 | 54 | gtag('config', '<?=$googleAnalyticsMainId?>'); |
| 55 | 55 | <?php }?> |
| 56 | 56 | |
| 57 | - <?php if(!empty($googleAnalyticsId)) {?> |
|
| 57 | + <?php if (!empty($googleAnalyticsId)) {?> |
|
| 58 | 58 | gtag('config', '<?=$googleAnalyticsId?>'); |
| 59 | 59 | <?php }?> |
| 60 | 60 | </script> |
@@ -79,8 +79,8 @@ discard block |
||
| 79 | 79 | <br> |
| 80 | 80 | <span id="lastsynced" ></span> |
| 81 | 81 | <br> |
| 82 | - <?php if($synced > 0) {?>(Synchronized every <?= $synced ?> seconds)<?php }?> |
|
| 83 | - <?php if($synced == 0) {?>(Synchronized continuously)<?php }?> |
|
| 82 | + <?php if ($synced > 0) {?>(Synchronized every <?= $synced ?> seconds)<?php }?> |
|
| 83 | + <?php if ($synced == 0) {?>(Synchronized continuously)<?php }?> |
|
| 84 | 84 | </p> |
| 85 | 85 | </div> |
| 86 | 86 | <p> |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $this->data = []; |
| 52 | 52 | |
| 53 | 53 | foreach ($slaves as $value) { |
| 54 | - if(empty($value) || !filter_var($value, FILTER_VALIDATE_URL)){ |
|
| 54 | + if (empty($value) || !filter_var($value, FILTER_VALIDATE_URL)) { |
|
| 55 | 55 | continue; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -156,13 +156,13 @@ |
||
| 156 | 156 | $this->connections = $this->maxConnections * $mirrors; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - $fulfilled = function ($response, $path) use ($success, $complete) { |
|
| 159 | + $fulfilled = function($response, $path) use ($success, $complete) { |
|
| 160 | 160 | $body = (string) $response->getBody(); |
| 161 | 161 | $success($body, $path); |
| 162 | 162 | $complete(); |
| 163 | 163 | }; |
| 164 | 164 | |
| 165 | - $rejected = function ($reason, $path) use ($complete) { |
|
| 165 | + $rejected = function($reason, $path) use ($complete) { |
|
| 166 | 166 | $uri = $reason->getRequest()->getUri(); |
| 167 | 167 | $host = $uri->getScheme().'://'.$uri->getHost(); |
| 168 | 168 | $uri = (string) $uri; |