Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — main ( d3a2ba...cb4bdb )
by Pedro
34:31 queued 19:34
created
src/app/Console/Commands/Upgrade/UpgradeCommand.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
             if ($this->shouldOfferFix($step, $result)) {
95 95
                 $options = $step->fixOptions($result);
96 96
 
97
-                if (! empty($options)) {
97
+                if (!empty($options)) {
98 98
                     [$choiceMap, $defaultLabel] = $this->normalizeFixOptions($options);
99 99
 
100
-                    if (! empty($choiceMap)) {
100
+                    if (!empty($choiceMap)) {
101 101
                         $question = trim($step->fixMessage($result));
102 102
                         $question = $question !== '' ? $question : 'Select an automatic fix option';
103 103
                         $selectedLabel = $this->choice('  '.$question, array_keys($choiceMap), $defaultLabel);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                             $this->closeProgressBlock(strtoupper($fixResult->status->label()), $fixResult->status->color());
112 112
                             $this->printResultDetails($fixResult);
113 113
 
114
-                            if (! $fixResult->status->isFailure()) {
114
+                            if (!$fixResult->status->isFailure()) {
115 115
                                 $this->progressBlock('Re-running '.$step->title());
116 116
 
117 117
                                 try {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                         $this->closeProgressBlock(strtoupper($fixResult->status->label()), $fixResult->status->color());
142 142
                         $this->printResultDetails($fixResult);
143 143
 
144
-                        if (! $fixResult->status->isFailure()) {
144
+                        if (!$fixResult->status->isFailure()) {
145 145
                             $this->progressBlock('Re-running '.$step->title());
146 146
 
147 147
                             try {
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
     ): int {
187 187
         $resultsCollection = collect($results);
188 188
 
189
-        $hasFailure = $resultsCollection->contains(function ($entry) {
189
+        $hasFailure = $resultsCollection->contains(function($entry) {
190 190
             /** @var StepResult $result */
191 191
             $result = $entry['result'];
192 192
 
193 193
             return $result->status->isFailure();
194 194
         });
195 195
 
196
-        $warnings = $resultsCollection->filter(function ($entry) {
196
+        $warnings = $resultsCollection->filter(function($entry) {
197 197
             /** @var StepResult $result */
198 198
             $result = $entry['result'];
199 199
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         });
202 202
 
203 203
         $failedTitles = $resultsCollection
204
-            ->filter(function ($entry) {
204
+            ->filter(function($entry) {
205 205
                 /** @var StepResult $result */
206 206
                 $result = $entry['result'];
207 207
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             $this->note('At least one step reported a failure. Review the messages above before continuing.', 'red', 'red');
221 221
         }
222 222
 
223
-        if (! $hasFailure && $warnings->isEmpty()) {
223
+        if (!$hasFailure && $warnings->isEmpty()) {
224 224
             $this->note('All checks passed, you are ready to continue with the manual steps from the upgrade guide.', 'green', 'green');
225 225
         }
226 226
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
             $postUpgradeCommands = ($config)::postUpgradeCommands();
247 247
         }
248 248
 
249
-        if ($expectedVersionInstalled && ! $hasFailure && ! empty($postUpgradeCommands)) {
249
+        if ($expectedVersionInstalled && !$hasFailure && !empty($postUpgradeCommands)) {
250 250
             $this->note("Now that you have {$versionLabel} installed, don't forget to run the following commands:", 'green', 'green');
251 251
 
252 252
             foreach ($postUpgradeCommands as $command) {
@@ -281,11 +281,11 @@  discard block
 block discarded – undo
281 281
 
282 282
     protected function shouldOfferFix(Step $step, StepResult $result): bool
283 283
     {
284
-        if (! $this->input->isInteractive()) {
284
+        if (!$this->input->isInteractive()) {
285 285
             return false;
286 286
         }
287 287
 
288
-        if (! in_array($result->status, [StepStatus::Warning, StepStatus::Failed], true)) {
288
+        if (!in_array($result->status, [StepStatus::Warning, StepStatus::Failed], true)) {
289 289
             return false;
290 290
         }
291 291
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                 $value = is_string($key) ? $key : $label;
316 316
             }
317 317
 
318
-            if (! is_string($label)) {
318
+            if (!is_string($label)) {
319 319
                 continue;
320 320
             }
321 321
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             }
334 334
         }
335 335
 
336
-        if ($defaultLabel === null && ! empty($choices)) {
336
+        if ($defaultLabel === null && !empty($choices)) {
337 337
             $defaultLabel = array_key_first($choices);
338 338
         }
339 339
 
@@ -350,11 +350,11 @@  discard block
 block discarded – undo
350 350
 
351 351
         $configProviderClass = sprintf('%s\\%s\\UpgradeCommandConfig', __NAMESPACE__, $descriptor['namespace']);
352 352
 
353
-        if (! class_exists($configProviderClass)) {
353
+        if (!class_exists($configProviderClass)) {
354 354
             $this->manuallyLoadConfigDirectory($descriptor);
355 355
         }
356 356
 
357
-        if (! class_exists($configProviderClass)) {
357
+        if (!class_exists($configProviderClass)) {
358 358
             throw new RuntimeException(sprintf(
359 359
                 'Missing upgrade config provider for Backpack %s. Please create %s.',
360 360
                 $descriptor['label'],
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
             ? $this->laravel->make($configProviderClass)
367 367
             : new $configProviderClass();
368 368
 
369
-        if (! $provider instanceof UpgradeConfigInterface) {
369
+        if (!$provider instanceof UpgradeConfigInterface) {
370 370
             throw new RuntimeException(sprintf(
371 371
                 'Upgrade config provider [%s] must implement %s.',
372 372
                 $configProviderClass,
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 
377 377
         $steps = $provider->steps();
378 378
 
379
-        if (! is_array($steps)) {
379
+        if (!is_array($steps)) {
380 380
             throw new RuntimeException(sprintf(
381 381
                 'Upgrade config provider [%s] must return an array of step class names.',
382 382
                 $configProviderClass
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                 $singleDescriptor = $sorted[0];
429 429
                 $singleConfig = $this->resolveConfigForDescriptor($singleDescriptor);
430 430
 
431
-                if (! $this->descriptorHasSteps($singleConfig)) {
431
+                if (!$this->descriptorHasSteps($singleConfig)) {
432 432
                     if ($this->displayDescriptorDescription($singleDescriptor, $singleConfig)) {
433 433
                         $this->newLine();
434 434
                     }
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
                 $hasSteps = $this->descriptorHasSteps($config);
447 447
                 $summary = $hasSteps ? $this->descriptorChoiceSummary($descriptor, $config) : null;
448 448
 
449
-                if (! $hasSteps) {
449
+                if (!$hasSteps) {
450 450
                     if ($this->displayDescriptorDescription($descriptor, $config)) {
451 451
                         $this->newLine();
452 452
                     }
@@ -552,13 +552,13 @@  discard block
 block discarded – undo
552 552
             return $this->descriptorChoiceSummaries[$key];
553 553
         }
554 554
 
555
-        if (! $config instanceof UpgradeConfigSummaryInterface) {
555
+        if (!$config instanceof UpgradeConfigSummaryInterface) {
556 556
             return $this->descriptorChoiceSummaries[$key] = null;
557 557
         }
558 558
 
559 559
         $summary = $config->upgradeCommandSummary();
560 560
 
561
-        if (! is_string($summary)) {
561
+        if (!is_string($summary)) {
562 562
             return $this->descriptorChoiceSummaries[$key] = null;
563 563
         }
564 564
 
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 
598 598
         try {
599 599
             $description($this);
600
-        } catch (\ArgumentCountError|\TypeError $exception) {
600
+        } catch (\ArgumentCountError | \TypeError $exception) {
601 601
             if ($description instanceof \Closure) {
602 602
                 $description->call($this);
603 603
 
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 
629 629
             $configPath = $directory.DIRECTORY_SEPARATOR.'UpgradeCommandConfig.php';
630 630
 
631
-            if (! $filesystem->exists($configPath)) {
631
+            if (!$filesystem->exists($configPath)) {
632 632
                 continue;
633 633
             }
634 634
 
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
     {
689 689
         $list = array_values($descriptors);
690 690
 
691
-        usort($list, function (array $a, array $b) use ($direction) {
691
+        usort($list, function(array $a, array $b) use ($direction) {
692 692
             $comparison = version_compare($a['comparable'], $b['comparable']);
693 693
 
694 694
             return $direction === 'desc' ? -$comparison : $comparison;
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
     protected function installedBackpackPrettyVersion(): ?string
729 729
     {
730 730
         try {
731
-            if (! InstalledVersions::isInstalled('backpack/crud')) {
731
+            if (!InstalledVersions::isInstalled('backpack/crud')) {
732 732
                 return null;
733 733
             }
734 734
         } catch (OutOfBoundsException $exception) {
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
 
782 782
     protected function segmentsToComparable(array $segments): string
783 783
     {
784
-        return implode('.', array_map(static function ($segment) {
784
+        return implode('.', array_map(static function($segment) {
785 785
             return (string) (int) $segment;
786 786
         }, $segments));
787 787
     }
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
 
800 800
         $stepsPath = $basePath.DIRECTORY_SEPARATOR.'Steps';
801 801
 
802
-        if (! $filesystem->isDirectory($stepsPath)) {
802
+        if (!$filesystem->isDirectory($stepsPath)) {
803 803
             return;
804 804
         }
805 805
 
Please login to merge, or discard this patch.
src/app/Console/Commands/Upgrade/v7/Steps/CheckThemeTablerConfigStep.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function fixOptions(StepResult $result): array
79 79
     {
80
-        if (! $this->needsPublish || $this->acceptedNewStyle) {
80
+        if (!$this->needsPublish || $this->acceptedNewStyle) {
81 81
             return [];
82 82
         }
83 83
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
     public function fix(StepResult $result): StepResult
103 103
     {
104
-        if (! $this->needsPublish) {
104
+        if (!$this->needsPublish) {
105 105
             return StepResult::skipped('Tabler theme config already published.');
106 106
         }
107 107
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         $packagePath = $this->configs->packageConfigPath($this->configFilename);
131 131
 
132
-        if (! is_file($packagePath)) {
132
+        if (!is_file($packagePath)) {
133 133
             return StepResult::failure('Could not publish config/backpack/theme-tabler.php automatically.');
134 134
         }
135 135
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             return StepResult::failure('Could not read the default Tabler config to publish it automatically.');
140 140
         }
141 141
 
142
-        if (! $this->configs->writePublishedFile($this->configFilename, $defaultContents)) {
142
+        if (!$this->configs->writePublishedFile($this->configFilename, $defaultContents)) {
143 143
             return StepResult::failure('Failed writing changes to config/backpack/theme-tabler.php.');
144 144
         }
145 145
 
Please login to merge, or discard this patch.