We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function upgradeCommandDescription(): ?callable |
| 21 | 21 | { |
| 22 | - return function (UpgradeCommand $command): void { |
|
| 22 | + return function(UpgradeCommand $command): void { |
|
| 23 | 23 | $command->note( |
| 24 | 24 | 'Thank you for choosing Backpack. If you are reading this, most likely you are upgrading from v6 to v7.'.PHP_EOL. |
| 25 | 25 | ' We have prepared an upgrade guide to help you with the process: <fg=cyan>https://backpackforlaravel.com/docs/7.x/upgrade-guide</>', |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $this->closeProgressBlock(strtoupper($fixResult->status->label()), $fixResult->status->color()); |
| 90 | 90 | $this->printResultDetails($fixResult); |
| 91 | 91 | |
| 92 | - if (! $fixResult->status->isFailure()) { |
|
| 92 | + if (!$fixResult->status->isFailure()) { |
|
| 93 | 93 | $this->progressBlock('Re-running '.$step->title()); |
| 94 | 94 | |
| 95 | 95 | try { |
@@ -129,14 +129,14 @@ discard block |
||
| 129 | 129 | ): int { |
| 130 | 130 | $resultsCollection = collect($results); |
| 131 | 131 | |
| 132 | - $hasFailure = $resultsCollection->contains(function ($entry) { |
|
| 132 | + $hasFailure = $resultsCollection->contains(function($entry) { |
|
| 133 | 133 | /** @var StepResult $result */ |
| 134 | 134 | $result = $entry['result']; |
| 135 | 135 | |
| 136 | 136 | return $result->status->isFailure(); |
| 137 | 137 | }); |
| 138 | 138 | |
| 139 | - $warnings = $resultsCollection->filter(function ($entry) { |
|
| 139 | + $warnings = $resultsCollection->filter(function($entry) { |
|
| 140 | 140 | /** @var StepResult $result */ |
| 141 | 141 | $result = $entry['result']; |
| 142 | 142 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $this->note(sprintf('%d step(s) reported warnings.', $warnings->count()), 'yellow', 'yellow'); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - if (! $hasFailure && $warnings->isEmpty()) { |
|
| 159 | + if (!$hasFailure && $warnings->isEmpty()) { |
|
| 160 | 160 | $this->note('All checks passed, you are ready to continue with the manual steps from the upgrade guide.', 'green', 'green'); |
| 161 | 161 | } |
| 162 | 162 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $postUpgradeCommands = ($config)::postUpgradeCommands(); |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | - if ($expectedVersionInstalled && ! $hasFailure && ! empty($postUpgradeCommands)) { |
|
| 169 | + if ($expectedVersionInstalled && !$hasFailure && !empty($postUpgradeCommands)) { |
|
| 170 | 170 | $this->note("Now that you have {$versionLabel} installed, don't forget to run the following commands:", 'green', 'green'); |
| 171 | 171 | |
| 172 | 172 | foreach ($postUpgradeCommands as $command) { |
@@ -201,11 +201,11 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | protected function shouldOfferFix(Step $step, StepResult $result): bool |
| 203 | 203 | { |
| 204 | - if (! $this->input->isInteractive()) { |
|
| 204 | + if (!$this->input->isInteractive()) { |
|
| 205 | 205 | return false; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - if (! in_array($result->status, [StepStatus::Warning, StepStatus::Failed], true)) { |
|
| 208 | + if (!in_array($result->status, [StepStatus::Warning, StepStatus::Failed], true)) { |
|
| 209 | 209 | return false; |
| 210 | 210 | } |
| 211 | 211 | |
@@ -222,11 +222,11 @@ discard block |
||
| 222 | 222 | |
| 223 | 223 | $configProviderClass = sprintf('%s\\%s\\UpgradeCommandConfig', __NAMESPACE__, $descriptor['namespace']); |
| 224 | 224 | |
| 225 | - if (! class_exists($configProviderClass)) { |
|
| 225 | + if (!class_exists($configProviderClass)) { |
|
| 226 | 226 | $this->manuallyLoadConfigDirectory($descriptor); |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | - if (! class_exists($configProviderClass)) { |
|
| 229 | + if (!class_exists($configProviderClass)) { |
|
| 230 | 230 | throw new RuntimeException(sprintf( |
| 231 | 231 | 'Missing upgrade config provider for Backpack %s. Please create %s.', |
| 232 | 232 | $descriptor['label'], |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | ? $this->laravel->make($configProviderClass) |
| 239 | 239 | : new $configProviderClass(); |
| 240 | 240 | |
| 241 | - if (! $provider instanceof UpgradeConfigInterface) { |
|
| 241 | + if (!$provider instanceof UpgradeConfigInterface) { |
|
| 242 | 242 | throw new RuntimeException(sprintf( |
| 243 | 243 | 'Upgrade config provider [%s] must implement %s.', |
| 244 | 244 | $configProviderClass, |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | $steps = $provider->steps(); |
| 250 | 250 | |
| 251 | - if (! is_array($steps)) { |
|
| 251 | + if (!is_array($steps)) { |
|
| 252 | 252 | throw new RuntimeException(sprintf( |
| 253 | 253 | 'Upgrade config provider [%s] must return an array of step class names.', |
| 254 | 254 | $configProviderClass |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | $singleDescriptor = $sorted[0]; |
| 301 | 301 | $singleConfig = $this->resolveConfigForDescriptor($singleDescriptor); |
| 302 | 302 | |
| 303 | - if (! $this->descriptorHasSteps($singleConfig)) { |
|
| 303 | + if (!$this->descriptorHasSteps($singleConfig)) { |
|
| 304 | 304 | if ($this->displayDescriptorDescription($singleDescriptor, $singleConfig)) { |
| 305 | 305 | $this->newLine(); |
| 306 | 306 | } |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $hasSteps = $this->descriptorHasSteps($config); |
| 319 | 319 | $summary = $hasSteps ? $this->descriptorChoiceSummary($descriptor, $config) : null; |
| 320 | 320 | |
| 321 | - if (! $hasSteps) { |
|
| 321 | + if (!$hasSteps) { |
|
| 322 | 322 | if ($this->displayDescriptorDescription($descriptor, $config)) { |
| 323 | 323 | $this->newLine(); |
| 324 | 324 | } |
@@ -424,13 +424,13 @@ discard block |
||
| 424 | 424 | return $this->descriptorChoiceSummaries[$key]; |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | - if (! $config instanceof UpgradeConfigSummaryInterface) { |
|
| 427 | + if (!$config instanceof UpgradeConfigSummaryInterface) { |
|
| 428 | 428 | return $this->descriptorChoiceSummaries[$key] = null; |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | $summary = $config->upgradeCommandSummary(); |
| 432 | 432 | |
| 433 | - if (! is_string($summary)) { |
|
| 433 | + if (!is_string($summary)) { |
|
| 434 | 434 | return $this->descriptorChoiceSummaries[$key] = null; |
| 435 | 435 | } |
| 436 | 436 | |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | |
| 470 | 470 | try { |
| 471 | 471 | $description($this); |
| 472 | - } catch (\ArgumentCountError|\TypeError $exception) { |
|
| 472 | + } catch (\ArgumentCountError | \TypeError $exception) { |
|
| 473 | 473 | if ($description instanceof \Closure) { |
| 474 | 474 | $description->call($this); |
| 475 | 475 | |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | |
| 501 | 501 | $configPath = $directory.DIRECTORY_SEPARATOR.'UpgradeCommandConfig.php'; |
| 502 | 502 | |
| 503 | - if (! $filesystem->exists($configPath)) { |
|
| 503 | + if (!$filesystem->exists($configPath)) { |
|
| 504 | 504 | continue; |
| 505 | 505 | } |
| 506 | 506 | |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | { |
| 561 | 561 | $list = array_values($descriptors); |
| 562 | 562 | |
| 563 | - usort($list, function (array $a, array $b) use ($direction) { |
|
| 563 | + usort($list, function(array $a, array $b) use ($direction) { |
|
| 564 | 564 | $comparison = version_compare($a['comparable'], $b['comparable']); |
| 565 | 565 | |
| 566 | 566 | return $direction === 'desc' ? -$comparison : $comparison; |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | protected function installedBackpackPrettyVersion(): ?string |
| 601 | 601 | { |
| 602 | 602 | try { |
| 603 | - if (! InstalledVersions::isInstalled('backpack/crud')) { |
|
| 603 | + if (!InstalledVersions::isInstalled('backpack/crud')) { |
|
| 604 | 604 | return null; |
| 605 | 605 | } |
| 606 | 606 | } catch (OutOfBoundsException $exception) { |
@@ -653,7 +653,7 @@ discard block |
||
| 653 | 653 | |
| 654 | 654 | protected function segmentsToComparable(array $segments): string |
| 655 | 655 | { |
| 656 | - return implode('.', array_map(static function ($segment) { |
|
| 656 | + return implode('.', array_map(static function($segment) { |
|
| 657 | 657 | return (string) (int) $segment; |
| 658 | 658 | }, $segments)); |
| 659 | 659 | } |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | |
| 672 | 672 | $stepsPath = $basePath.DIRECTORY_SEPARATOR.'Steps'; |
| 673 | 673 | |
| 674 | - if (! $filesystem->isDirectory($stepsPath)) { |
|
| 674 | + if (!$filesystem->isDirectory($stepsPath)) { |
|
| 675 | 675 | return; |
| 676 | 676 | } |
| 677 | 677 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | |
| 61 | 61 | public function upgradeCommandDescription(): ?callable |
| 62 | 62 | { |
| 63 | - return function (UpgradeCommand $command): void { |
|
| 63 | + return function(UpgradeCommand $command): void { |
|
| 64 | 64 | $command->note( |
| 65 | 65 | 'These checks will highlight anything you need to tackle before enjoying the new release.'.PHP_EOL. |
| 66 | 66 | ' Full upgrade instructions: <fg=cyan>https://backpackforlaravel.com/docs/7.x/upgrade-guide</>', |