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 — add-form-component ( 047989...bf55a0 )
by Pedro
14:04
created
src/BackpackServiceProvider.php 1 patch
Spacing   +15 added lines, -17 removed lines patch added patch discarded remove patch
@@ -83,32 +83,32 @@  discard block
 block discarded – undo
83 83
 
84 84
         $this->registerBackpackErrorViews();
85 85
 
86
-        $this->app->bind('crud', function ($app) {
86
+        $this->app->bind('crud', function($app) {
87 87
             return CrudManager::identifyCrudPanel();
88 88
         });
89 89
 
90
-        $this->app->scoped('CrudManager', function ($app) {
90
+        $this->app->scoped('CrudManager', function($app) {
91 91
             return new CrudPanelManager();
92 92
         });
93 93
 
94
-        $this->app->scoped('DatabaseSchema', function ($app) {
94
+        $this->app->scoped('DatabaseSchema', function($app) {
95 95
             return new DatabaseSchema();
96 96
         });
97 97
 
98
-        $this->app->scoped('BackpackLifecycleHooks', function ($app) {
98
+        $this->app->scoped('BackpackLifecycleHooks', function($app) {
99 99
             return new app\Library\CrudPanel\Hooks\LifecycleHooks();
100 100
         });
101 101
 
102
-        $this->app->singleton('BackpackViewNamespaces', function ($app) {
102
+        $this->app->singleton('BackpackViewNamespaces', function($app) {
103 103
             return new ViewNamespaces();
104 104
         });
105 105
 
106 106
         // Bind the widgets collection object to Laravel's service container
107
-        $this->app->singleton('widgets', function ($app) {
107
+        $this->app->singleton('widgets', function($app) {
108 108
             return new Collection();
109 109
         });
110 110
 
111
-        $this->app->scoped('UploadersRepository', function ($app) {
111
+        $this->app->scoped('UploadersRepository', function($app) {
112 112
             return new UploadersRepository();
113 113
         });
114 114
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $middleware_key = config('backpack.base.middleware_key');
125 125
         $middleware_class = config('backpack.base.middleware_class');
126 126
 
127
-        if (! is_array($middleware_class)) {
127
+        if (!is_array($middleware_class)) {
128 128
             $router->pushMiddlewareToGroup($middleware_key, $middleware_class);
129 129
 
130 130
             return;
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         $configs = scandir(__DIR__."/config/backpack/$dir/");
240 240
         $configs = array_diff($configs, ['.', '..']);
241 241
 
242
-        if (! count($configs)) {
242
+        if (!count($configs)) {
243 243
             return;
244 244
         }
245 245
 
@@ -288,8 +288,7 @@  discard block
 block discarded – undo
288 288
         // add the backpack_users password broker to the configuration
289 289
         $laravelAuthPasswordBrokers = app()->config['auth.passwords'];
290 290
         $laravelFirstPasswordBroker = is_array($laravelAuthPasswordBrokers) && current($laravelAuthPasswordBrokers) ?
291
-                                        current($laravelAuthPasswordBrokers)['table'] :
292
-                                        '';
291
+                                        current($laravelAuthPasswordBrokers)['table'] : '';
293 292
 
294 293
         $backpackPasswordBrokerTable = config('backpack.base.password_resets_table') ??
295 294
                                         config('auth.passwords.users.table') ??
@@ -317,7 +316,7 @@  discard block
 block discarded – undo
317 316
 
318 317
     public function loadViewComponents()
319 318
     {
320
-        $this->app->afterResolving(BladeCompiler::class, function () {
319
+        $this->app->afterResolving(BladeCompiler::class, function() {
321 320
             Blade::componentNamespace('Backpack\\CRUD\\app\\View\\Components', 'backpack');
322 321
         });
323 322
     }
@@ -343,13 +342,13 @@  discard block
 block discarded – undo
343 342
     private function registerBackpackErrorViews()
344 343
     {
345 344
         // register the backpack error when the exception handler is resolved from the container
346
-        $this->callAfterResolving(ExceptionHandler::class, function ($handler) {
347
-            if (! Str::startsWith(request()->path(), config('backpack.base.route_prefix'))) {
345
+        $this->callAfterResolving(ExceptionHandler::class, function($handler) {
346
+            if (!Str::startsWith(request()->path(), config('backpack.base.route_prefix'))) {
348 347
                 return;
349 348
             }
350 349
 
351 350
             // parse the namespaces set in config
352
-            [$themeNamespace, $themeFallbackNamespace] = (function () {
351
+            [$themeNamespace, $themeFallbackNamespace] = (function() {
353 352
                 $themeNamespace = config('backpack.ui.view_namespace');
354 353
                 $themeFallbackNamespace = config('backpack.ui.view_namespace_fallback');
355 354
 
@@ -366,8 +365,7 @@  discard block
 block discarded – undo
366 365
             // - fallback theme paths
367 366
             // - ui path
368 367
             $themeErrorPaths = $viewFinderHints[$themeNamespace] ?? [];
369
-            $themeErrorPaths = $themeNamespace === $themeFallbackNamespace ? $themeErrorPaths :
370
-                array_merge($viewFinderHints[$themeFallbackNamespace] ?? [], $themeErrorPaths);
368
+            $themeErrorPaths = $themeNamespace === $themeFallbackNamespace ? $themeErrorPaths : array_merge($viewFinderHints[$themeFallbackNamespace] ?? [], $themeErrorPaths);
371 369
             $uiErrorPaths = [base_path('vendor/backpack/crud/src/resources/views/ui')];
372 370
             $themeErrorPaths = array_merge($themeErrorPaths, $uiErrorPaths);
373 371
 
Please login to merge, or discard this patch.
src/app/Library/Support/DatatableCache.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function cacheForComponent(string $tableId, string $controllerClass, ?\Closure $setup = null, ?string $name = null, ?CrudPanel $crud = null): bool
28 28
     {
29
-        if (! $setup) {
29
+        if (!$setup) {
30 30
             return false;
31 31
         }
32 32
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         // Check if the request has a datatable_id parameter
88 88
         $tableId = request('datatable_id');
89 89
 
90
-        if (! $tableId) {
90
+        if (!$tableId) {
91 91
             \Log::debug('Missing datatable_id in request parameters');
92 92
 
93 93
             return false;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function applySetupClosure(CrudPanel $crud, string $controllerClass, \Closure $setupClosure, $entry = null): bool
109 109
     {
110 110
         $originalSetup = $setupClosure;
111
-        $modifiedSetup = function ($crud, $entry) use ($originalSetup, $controllerClass) {
111
+        $modifiedSetup = function($crud, $entry) use ($originalSetup, $controllerClass) {
112 112
             CrudManager::setActiveController($controllerClass);
113 113
 
114 114
             // Run the original closure
Please login to merge, or discard this patch.
src/app/Library/Support/SetupCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $cacheKey = $this->generateCacheKey($identifier);
44 44
         $cachedData = Cache::get($cacheKey);
45 45
 
46
-        if (! $cachedData) {
46
+        if (!$cachedData) {
47 47
             return false;
48 48
         }
49 49
 
Please login to merge, or discard this patch.
src/app/View/Components/Datatable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             );
38 38
         }
39 39
 
40
-        if (! $this->crud->has('list.datatablesUrl')) {
40
+        if (!$this->crud->has('list.datatablesUrl')) {
41 41
             $this->crud->set('list.datatablesUrl', $this->crud->getRoute());
42 42
         }
43 43
 
Please login to merge, or discard this patch.
src/CrudPanelManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     /**
35 35
      * Get or create a CrudPanel instance for the given controller.
36 36
      */
37
-    public function getCrudPanel(CrudControllerContract|string $controller): CrudPanel
37
+    public function getCrudPanel(CrudControllerContract | string $controller): CrudPanel
38 38
     {
39 39
         $controllerClass = is_string($controller) ? $controller : get_class($controller);
40 40
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $crud->setOperation($operation);
70 70
 
71 71
         $primaryControllerRequest = $this->cruds[array_key_first($this->cruds)]->getRequest();
72
-        if (! $crud->isInitialized() || ! $this->isOperationInitialized($controller::class, $operation)) {
72
+        if (!$crud->isInitialized() || !$this->isOperationInitialized($controller::class, $operation)) {
73 73
             self::setActiveController($controller::class);
74 74
             $crud->initialized = false;
75 75
             $controller->initializeCrudPanel($primaryControllerRequest, $crud);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function storeInitializedOperation(string $controller, ?string $operation): void
92 92
     {
93
-        if (! $operation) {
93
+        if (!$operation) {
94 94
             return;
95 95
         }
96 96
         $this->initializedOperations[$controller][] = $operation;
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function getActiveCrudPanel(string $controller): CrudPanel
141 141
     {
142
-        if (! isset($this->cruds[$controller])) {
142
+        if (!isset($this->cruds[$controller])) {
143 143
             return $this->getCrudPanel($this->getActiveController() ?? $this->getParentController() ?? $controller);
144 144
         }
145 145
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      */
154 154
     public function getParentController(): ?string
155 155
     {
156
-        if (! empty($this->cruds)) {
156
+        if (!empty($this->cruds)) {
157 157
             return array_key_first($this->cruds);
158 158
         }
159 159
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
         $cruds = $this->getCrudPanels();
228 228
 
229
-        if (! empty($cruds)) {
229
+        if (!empty($cruds)) {
230 230
             $crudPanel = reset($cruds);
231 231
 
232 232
             return $crudPanel;
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/CreateOperation.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $this->crud->allowAccess('create');
38 38
 
39
-        LifecycleHook::hookInto('create:before_setup', function () {
39
+        LifecycleHook::hookInto('create:before_setup', function() {
40 40
             $this->crud->setupDefaultSaveActions();
41 41
         });
42 42
 
43
-        LifecycleHook::hookInto('list:before_setup', function () {
43
+        LifecycleHook::hookInto('list:before_setup', function() {
44 44
             $this->crud->addButton('top', 'create', 'view', 'crud::buttons.create');
45 45
         });
46 46
     }
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
         // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package
63 63
         return  request()->ajax() ?
64
-            view('crud::components.form.form_ajax_view', $this->data) :
65
-            view($this->crud->getCreateView(), $this->data);
64
+            view('crud::components.form.form_ajax_view', $this->data) : view($this->crud->getCreateView(), $this->data);
66 65
     }
67 66
 
68 67
     public function createForm()
@@ -70,7 +69,7 @@  discard block
 block discarded – undo
70 69
         $this->crud->hasAccessOrFail('create');
71 70
 
72 71
         // if the request isn't an AJAX request, return a 404
73
-        if (! request()->ajax()) {
72
+        if (!request()->ajax()) {
74 73
             abort(404);
75 74
         }
76 75
 
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/UpdateOperation.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $this->crud->allowAccess('update');
38 38
 
39
-        LifecycleHook::hookInto('update:before_setup', function () {
39
+        LifecycleHook::hookInto('update:before_setup', function() {
40 40
             $this->crud->loadDefaultOperationSettingsFromConfig();
41 41
 
42 42
             if ($this->crud->getModel()->translationEnabled()) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $this->crud->setupDefaultSaveActions();
51 51
         });
52 52
 
53
-        LifecycleHook::hookInto(['list:before_setup', 'show:before_setup'], function () {
53
+        LifecycleHook::hookInto(['list:before_setup', 'show:before_setup'], function() {
54 54
             $this->crud->addButton('line', 'update', 'view', 'crud::buttons.update', 'end');
55 55
         });
56 56
     }
@@ -83,8 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package
85 85
         return  request()->ajax() ?
86
-            view('crud::components.form.form_ajax_view', $this->data) :
87
-            view($this->crud->getEditView(), $this->data);
86
+            view('crud::components.form.form_ajax_view', $this->data) : view($this->crud->getEditView(), $this->data);
88 87
     }
89 88
 
90 89
     /**
Please login to merge, or discard this patch.
src/app/View/Components/Form.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
 
28 28
     ) {
29 29
         // Get CRUD panel instance from the controller
30
-        if(CrudManager::hasCrudPanel($controller)) {
30
+        if (CrudManager::hasCrudPanel($controller)) {
31 31
             $previousOperation = CrudManager::getCrudPanel($controller)->getOperation();
32 32
         }
33 33
 
34 34
         $this->crud = CrudManager::setupCrudPanel($controller, $operation);
35 35
         
36
-        if(isset(($previousOperation))) {
36
+        if (isset(($previousOperation))) {
37 37
             $this->crud->setOperation($previousOperation);
38 38
         }
39 39
 
Please login to merge, or discard this patch.