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 — coverage-badge-dont-delete ( 6cffcb...8cf524 )
by
unknown
27:21 queued 12:20
created
src/resources/views/crud/reorder.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     <?php
28 28
     function tree_element($entry, $key, $all_entries, $crud)
29 29
     {
30
-        if (! isset($entry->tree_element_shown)) {
30
+        if (!isset($entry->tree_element_shown)) {
31 31
             // mark the element as shown
32 32
             $all_entries[$key]->tree_element_shown = true;
33 33
             $entry->tree_element_shown = true;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 <ol class="sortable mt-0 mb-0">
71 71
                     <?php
72 72
                     $all_entries = collect($entries->all())->sortBy('lft')->keyBy($crud->getModel()->getKeyName());
73
-    $root_entries = $all_entries->filter(function ($item) {
73
+    $root_entries = $all_entries->filter(function($item) {
74 74
         return $item->parent_id == 0;
75 75
     });
76 76
     foreach ($root_entries as $key => $entry) {
Please login to merge, or discard this patch.
src/BackpackServiceProvider.php 1 patch
Spacing   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -81,24 +81,24 @@  discard block
 block discarded – undo
81 81
         $this->registerBackpackErrorViews();
82 82
 
83 83
         // Bind the CrudPanel object to Laravel's service container
84
-        $this->app->scoped('crud', function ($app) {
84
+        $this->app->scoped('crud', function($app) {
85 85
             return new CrudPanel();
86 86
         });
87 87
 
88
-        $this->app->scoped('DatabaseSchema', function ($app) {
88
+        $this->app->scoped('DatabaseSchema', function($app) {
89 89
             return new DatabaseSchema();
90 90
         });
91 91
 
92
-        $this->app->singleton('BackpackViewNamespaces', function ($app) {
92
+        $this->app->singleton('BackpackViewNamespaces', function($app) {
93 93
             return new ViewNamespaces();
94 94
         });
95 95
 
96 96
         // Bind the widgets collection object to Laravel's service container
97
-        $this->app->singleton('widgets', function ($app) {
97
+        $this->app->singleton('widgets', function($app) {
98 98
             return new Collection();
99 99
         });
100 100
 
101
-        $this->app->scoped('UploadersRepository', function ($app) {
101
+        $this->app->scoped('UploadersRepository', function($app) {
102 102
             return new UploadersRepository();
103 103
         });
104 104
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $middleware_key = config('backpack.base.middleware_key');
115 115
         $middleware_class = config('backpack.base.middleware_class');
116 116
 
117
-        if (! is_array($middleware_class)) {
117
+        if (!is_array($middleware_class)) {
118 118
             $router->pushMiddlewareToGroup($middleware_key, $middleware_class);
119 119
 
120 120
             return;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         $configs = scandir(__DIR__."/config/backpack/$dir/");
228 228
         $configs = array_diff($configs, ['.', '..']);
229 229
 
230
-        if (! count($configs)) {
230
+        if (!count($configs)) {
231 231
             return;
232 232
         }
233 233
 
@@ -326,13 +326,13 @@  discard block
 block discarded – undo
326 326
     private function registerBackpackErrorViews()
327 327
     {
328 328
         // register the backpack error when the exception handler is resolved from the container
329
-        $this->callAfterResolving(ExceptionHandler::class, function ($handler) {
330
-            if (! Str::startsWith(request()->path(), config('backpack.base.route_prefix'))) {
329
+        $this->callAfterResolving(ExceptionHandler::class, function($handler) {
330
+            if (!Str::startsWith(request()->path(), config('backpack.base.route_prefix'))) {
331 331
                 return;
332 332
             }
333 333
 
334 334
             // parse the namespaces set in config
335
-            [$themeNamespace, $themeFallbackNamespace] = (function () {
335
+            [$themeNamespace, $themeFallbackNamespace] = (function() {
336 336
                 $themeNamespace = config('backpack.ui.view_namespace');
337 337
                 $themeFallbackNamespace = config('backpack.ui.view_namespace_fallback');
338 338
 
@@ -349,8 +349,7 @@  discard block
 block discarded – undo
349 349
             // - fallback theme paths
350 350
             // - ui path
351 351
             $themeErrorPaths = $viewFinderHints[$themeNamespace] ?? [];
352
-            $themeErrorPaths = $themeNamespace === $themeFallbackNamespace ? $themeErrorPaths :
353
-                array_merge($viewFinderHints[$themeFallbackNamespace] ?? [], $themeErrorPaths);
352
+            $themeErrorPaths = $themeNamespace === $themeFallbackNamespace ? $themeErrorPaths : array_merge($viewFinderHints[$themeFallbackNamespace] ?? [], $themeErrorPaths);
354 353
             $uiErrorPaths = [base_path('vendor/backpack/crud/src/resources/views/ui')];
355 354
             $themeErrorPaths = array_merge($themeErrorPaths, $uiErrorPaths);
356 355
 
Please login to merge, or discard this patch.
src/routes/backpack/testing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     (array) config('backpack.base.middleware_key', 'admin'),
16 16
     'prefix'     => config('backpack.base.route_prefix', 'admin'),
17 17
 ],
18
-    function () {
18
+    function() {
19 19
         Route::crud('users', 'Backpack\CRUD\Tests\Config\Http\Controllers\UserCrudController');
20 20
     }
21 21
 );
Please login to merge, or discard this patch.
src/ThemeServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         }
141 141
 
142 142
         // Registering package commands.
143
-        if (! empty($this->commands)) {
143
+        if (!empty($this->commands)) {
144 144
             $this->commands($this->commands);
145 145
         }
146 146
     }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     protected function packageDirectoryExistsAndIsNotEmpty($name)
236 236
     {
237 237
         // check if directory exists
238
-        if (! is_dir($this->getPath().'/'.$name)) {
238
+        if (!is_dir($this->getPath().'/'.$name)) {
239 239
             return false;
240 240
         }
241 241
 
Please login to merge, or discard this patch.
src/app/Console/Commands/Install.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         // Install Backpack Generators
85 85
         $this->progressBlock('Installing Generators');
86
-        if (! file_exists('vendor/backpack/generators/composer.json')) {
86
+        if (!file_exists('vendor/backpack/generators/composer.json')) {
87 87
             // only do this if Generators aren't already required
88 88
             $process = new Process(['composer', 'require', '--dev', 'backpack/generators']);
89 89
             $process->setTimeout(300);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->closeProgressBlock();
98 98
 
99 99
         // Optional commands
100
-        if (! $this->option('no-interaction')) {
100
+        if (!$this->option('no-interaction')) {
101 101
             // Themes
102 102
             $this->installTheme();
103 103
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
             // Addons
108 108
             $this->installAddons();
109
-        } elseif (! $this->isAnyThemeInstalled()) {
109
+        } elseif (!$this->isAnyThemeInstalled()) {
110 110
             // Install default theme
111 111
             $this->progressBlock('Installing default theme');
112 112
             $this->executeArtisanProcess('backpack:require:theme-coreuiv2');
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         $this->deleteLines(3);
189 189
 
190
-        if (! $total) {
190
+        if (!$total) {
191 191
             $this->deleteLines();
192 192
             $this->note('Skipping creating an admin user.');
193 193
             $this->newLine();
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
 
197 197
     private function isEveryAddonInstalled()
198 198
     {
199
-        return collect($this->addons)->every(function ($addon) {
199
+        return collect($this->addons)->every(function($addon) {
200 200
             return file_exists($addon->path);
201 201
         });
202 202
     }
203 203
 
204 204
     private function updateAddonsStatus()
205 205
     {
206
-        $this->addons = $this->addons->each(function (&$addon) {
206
+        $this->addons = $this->addons->each(function(&$addon) {
207 207
             $isInstalled = file_exists($addon->path);
208 208
             $addon->status = $isInstalled ? 'installed' : 'not installed';
209 209
             $addon->statusColor = $isInstalled ? 'green' : 'yellow';
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     {
215 215
         // map the addons
216 216
         $this->addons = collect($this->addons)
217
-            ->map(function ($class) {
217
+            ->map(function($class) {
218 218
                 return (object) $class::$addon;
219 219
             });
220 220
 
@@ -233,15 +233,15 @@  discard block
 block discarded – undo
233 233
 
234 234
         // Calculate the printed line count
235 235
         $printedLines = $this->addons
236
-            ->map(function ($e) {
236
+            ->map(function($e) {
237 237
                 return count($e->description);
238 238
             })
239
-            ->reduce(function ($sum, $item) {
239
+            ->reduce(function($sum, $item) {
240 240
                 return $sum + $item + 2;
241 241
             }, 0);
242 242
 
243 243
         $total = 0;
244
-        while (! $this->isEveryAddonInstalled()) {
244
+        while (!$this->isEveryAddonInstalled()) {
245 245
             $input = (int) $this->listChoice('Would you like to install a premium Backpack add-on? <fg=gray>(enter option number: 1, 2 or 3)</>', $this->addons->toArray());
246 246
 
247 247
             if ($input < 1 || $input > $this->addons->count()) {
@@ -276,14 +276,14 @@  discard block
 block discarded – undo
276 276
 
277 277
     private function isEveryThemeInstalled()
278 278
     {
279
-        return $this->themes()->every(function ($theme) {
279
+        return $this->themes()->every(function($theme) {
280 280
             return $theme->status == 'installed';
281 281
         });
282 282
     }
283 283
 
284 284
     private function isAnyThemeInstalled()
285 285
     {
286
-        return $this->themes()->filter(function ($theme) {
286
+        return $this->themes()->filter(function($theme) {
287 287
             return $theme->status == 'installed';
288 288
         })->count() > 0;
289 289
     }
@@ -301,10 +301,10 @@  discard block
 block discarded – undo
301 301
 
302 302
         // Calculate the printed line count
303 303
         $printedLines = $this->themes()
304
-            ->map(function ($e) {
304
+            ->map(function($e) {
305 305
                 return count($e->description);
306 306
             })
307
-            ->reduce(function ($sum, $item) {
307
+            ->reduce(function($sum, $item) {
308 308
                 return $sum + $item + 2;
309 309
             }, 0);
310 310
 
@@ -340,9 +340,9 @@  discard block
 block discarded – undo
340 340
     public function themes()
341 341
     {
342 342
         return collect($this->themes)
343
-            ->map(function ($class) {
343
+            ->map(function($class) {
344 344
                 return (object) $class::$addon;
345
-            })->each(function (&$theme) {
345
+            })->each(function(&$theme) {
346 346
                 $isInstalled = file_exists($theme->path);
347 347
                 $theme->status = $isInstalled ? 'installed' : 'not installed';
348 348
                 $theme->statusColor = $isInstalled ? 'green' : 'yellow';
Please login to merge, or discard this patch.
src/app/Console/Commands/AddMenuContent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->progressBlock("Adding menu entry to <fg=blue>$path</>");
50 50
 
51 51
         // Validate file exists
52
-        if (! $disk->exists($path)) {
52
+        if (!$disk->exists($path)) {
53 53
             $this->errorProgressBlock();
54 54
             $this->note('The menu_items file does not exist. Make sure Backpack is properly installed.', 'red');
55 55
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             return;
67 67
         }
68 68
 
69
-        if (! $disk->put($path, $contents.PHP_EOL.$code)) {
69
+        if (!$disk->put($path, $contents.PHP_EOL.$code)) {
70 70
             $this->errorProgressBlock();
71 71
             $this->note('Could not write to menu_items file.', 'red');
72 72
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     private function getLastLineNumberThatContains($needle, $haystack)
87 87
     {
88
-        $matchingLines = array_filter($haystack, function ($k) use ($needle) {
88
+        $matchingLines = array_filter($haystack, function($k) use ($needle) {
89 89
             return strpos($k, $needle) !== false;
90 90
         });
91 91
 
Please login to merge, or discard this patch.
src/app/Console/Commands/Themes/InstallsTheme.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         }
72 72
 
73 73
         // Display general error in case it failed
74
-        if (! $this->isInstalled()) {
74
+        if (!$this->isInstalled()) {
75 75
             $this->errorProgressBlock();
76 76
             $this->note('For further information please check the log file.');
77 77
             $this->note('You can also follow the manual installation process documented on Github.');
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $this->progressBlock('Publish theme config file');
85 85
 
86 86
         // manually include the provider in the run-time
87
-        if (! class_exists(self::$addon['provider'])) {
87
+        if (!class_exists(self::$addon['provider'])) {
88 88
             include self::$addon['provider_path'] ?? self::$addon['path'].'/src/AddonServiceProvider.php';
89 89
             app()->register(self::$addon['provider']);
90 90
         }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/CrudField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     public function subfields($subfields)
228 228
     {
229
-        $callAttributeMacro = ! isset($this->attributes['subfields']);
229
+        $callAttributeMacro = !isset($this->attributes['subfields']);
230 230
         $this->attributes['subfields'] = $subfields;
231 231
         $this->attributes = $this->crud()->makeSureFieldHasNecessaryAttributes($this->attributes);
232 232
         if ($callAttributeMacro) {
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         // append the field name to the rule name of validationMessages array.
277 277
         // eg: ['required => 'This field is required']
278 278
         // will be transformed into: ['field_name.required' => 'This field is required]
279
-        $this->crud()->setValidationFromArray([], array_merge(...array_map(function ($rule, $message) {
279
+        $this->crud()->setValidationFromArray([], array_merge(...array_map(function($rule, $message) {
280 280
             return [$this->attributes['name'].'.'.$rule => $message];
281 281
         }, array_keys($messages), $messages)));
282 282
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/CrudButton.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     private function getViewPathsWithFallbacks()
300 300
     {
301 301
         $type = $this->name;
302
-        $paths = array_map(function ($item) use ($type) {
302
+        $paths = array_map(function($item) use ($type) {
303 303
             return $item.'.'.$type;
304 304
         }, ViewNamespaces::getFor('buttons'));
305 305
 
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 
468 468
         $itemExists = $this->collection()->contains('name', $this->name);
469 469
 
470
-        if (! $itemExists) {
470
+        if (!$itemExists) {
471 471
             $this->crud()->addCrudButton($this);
472 472
             if ($this->position == 'beginning') {
473 473
                 $this->before($this->collection()->first()->name);
Please login to merge, or discard this patch.