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 — next ( d901ea...c80d63 )
by Cristian
17:46
created
src/app/Library/CrudPanel/Traits/AutoSet.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $this->getDbColumnTypes();
18 18
 
19
-        array_map(function ($field) use ($setFields, $setColumns) {
20
-            if ($setFields && ! isset($this->getCleanStateFields()[$field])) {
19
+        array_map(function($field) use ($setFields, $setColumns) {
20
+            if ($setFields && !isset($this->getCleanStateFields()[$field])) {
21 21
                 $this->addField([
22 22
                     'name' => $field,
23 23
                     'label' => $this->makeLabel($field),
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 ]);
31 31
             }
32 32
 
33
-            if ($setColumns && ! in_array($field, $this->getModel()->getHidden()) && ! isset($this->columns()[$field])) {
33
+            if ($setColumns && !in_array($field, $this->getModel()->getHidden()) && !isset($this->columns()[$field])) {
34 34
                 $this->addColumn([
35 35
                     'name' => $field,
36 36
                     'label' => $this->makeLabel($field),
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $dbColumnTypes = [];
54 54
 
55
-        if (! $this->driverIsSql()) {
55
+        if (!$this->driverIsSql()) {
56 56
             return $dbColumnTypes;
57 57
         }
58 58
         $dbColumns = $this->getDbTableColumns();
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         $dbColumnTypes = $this->getDbColumnTypes();
119 119
 
120
-        if (! isset($dbColumnTypes[$fieldName])) {
120
+        if (!isset($dbColumnTypes[$fieldName])) {
121 121
             return 'text';
122 122
         }
123 123
 
@@ -212,12 +212,12 @@  discard block
 block discarded – undo
212 212
     {
213 213
         $fillable = $this->model->getFillable();
214 214
 
215
-        if (! $this->driverIsSql()) {
215
+        if (!$this->driverIsSql()) {
216 216
             $columns = $fillable;
217 217
         } else {
218 218
             // Automatically-set columns should be both in the database, and in the $fillable variable on the Eloquent Model
219 219
             $columns = $this->model::getDbTableSchema()->getColumnsNames();
220
-            if (! empty($fillable)) {
220
+            if (!empty($fillable)) {
221 221
                 $columns = array_intersect($columns, $fillable);
222 222
             }
223 223
         }
Please login to merge, or discard this patch.
tests/config/CrudPanel/BaseCrudPanel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $app['config']->set('database.default', 'testing');
43 43
         $app['config']->set('backpack.base.route_prefix', 'admin');
44 44
 
45
-        $app->bind('App\Http\Middleware\CheckIfAdmin', function () {
45
+        $app->bind('App\Http\Middleware\CheckIfAdmin', function() {
46 46
             return new class
47 47
             {
48 48
                 public function handle($request, $next)
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             };
53 53
         });
54 54
 
55
-        $app->scoped('crud', function () {
55
+        $app->scoped('crud', function() {
56 56
             return new CrudPanel();
57 57
         });
58 58
     }
Please login to merge, or discard this patch.
tests/config/CrudPanel/BaseDBCrudPanelWithSingleton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     {
33 33
         parent::getEnvironmentSetUp($app);
34 34
 
35
-        $app->scoped('crud', function () {
35
+        $app->scoped('crud', function() {
36 36
             return new CrudPanel();
37 37
         });
38 38
     }
Please login to merge, or discard this patch.
tests/Unit/CrudPanel/CrudPanelAutoSetTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -851,7 +851,7 @@
 block discarded – undo
851 851
     public function testSetDoctrineTypesMapping()
852 852
     {
853 853
         $this->crudPanel->setModel(ColumnType::class);
854
-        if (! method_exists($this->crudPanel->getModel()->getConnection(), 'getDoctrineConnection')) {
854
+        if (!method_exists($this->crudPanel->getModel()->getConnection(), 'getDoctrineConnection')) {
855 855
             $this->markTestSkipped('This test is only for Laravel 10, Laravel 11 does not have dbal as a dependency anymore');
856 856
         }
857 857
 
Please login to merge, or discard this patch.
src/app/Http/Controllers/CrudController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
         //
35 35
         // It's done inside a middleware closure in order to have
36 36
         // the complete request inside the CrudPanel object.
37
-        $this->middleware(function ($request, $next) {
38
-            if (! CrudManager::hasCrudPanel(get_class($this))) {
37
+        $this->middleware(function($request, $next) {
38
+            if (!CrudManager::hasCrudPanel(get_class($this))) {
39 39
                 $this->initializeCrudPanel($request);
40 40
 
41 41
                 return $next($request);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $crudPanel->getCurrentOperation()
61 61
         );
62 62
         
63
-        if (! $crudPanel->isInitialized()) {
63
+        if (!$crudPanel->isInitialized()) {
64 64
             $crudPanel->initialized = true;
65 65
 
66 66
             $this->setupCrudController($crudPanel->getCurrentOperation());
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     protected function setupConfigurationForCurrentOperation(?string $operation = null)
132 132
     {
133 133
         $operationName = $operation ?? $this->crud->getCurrentOperation();
134
-        if (! $operationName) {
134
+        if (!$operationName) {
135 135
             return;
136 136
         }
137 137
         $setupClassName = 'setup'.Str::studly($operationName).'Operation';
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Hooks/LifecycleHooks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     public array $hooks = [];
10 10
 
11
-    public function hookInto(string|array $hooks, callable $callback): void
11
+    public function hookInto(string | array $hooks, callable $callback): void
12 12
     {
13 13
         $hooks = is_array($hooks) ? $hooks : [$hooks];
14 14
         $controller = CrudManager::getActiveController() ?? CrudManager::getParentController();
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         }
18 18
     }
19 19
 
20
-    public function trigger(string|array $hooks, array $parameters = []): void
20
+    public function trigger(string | array $hooks, array $parameters = []): void
21 21
     {
22 22
         $hooks = is_array($hooks) ? $hooks : [$hooks];
23 23
         $controller = CrudManager::getActiveController() ?? CrudManager::getParentController();
Please login to merge, or discard this patch.
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/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()) {
72
+        if (!$crud->isInitialized()) {
73 73
             self::setActiveController($controller::class);
74 74
             $controller->initializeCrudPanel($primaryControllerRequest, $crud);
75 75
             self::unsetActiveController();
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function storeInitializedOperation(string $controller, ?string $operation): void
91 91
     {
92
-        if (! $operation) {
92
+        if (!$operation) {
93 93
             return;
94 94
         }
95 95
         $this->initializedOperations[$controller][] = $operation;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function getActiveCrudPanel(string $controller): CrudPanel
132 132
     {
133
-        if (! isset($this->cruds[$controller])) {
133
+        if (!isset($this->cruds[$controller])) {
134 134
             return $this->getCrudPanel($this->getActiveController() ?? $this->getParentController() ?? $controller);
135 135
         }
136 136
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function getParentController(): ?string
146 146
     {
147
-        if (! empty($this->cruds)) {
147
+        if (!empty($this->cruds)) {
148 148
             return array_key_first($this->cruds);
149 149
         }
150 150
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
         $cruds = $this->getCrudPanels();
219 219
 
220
-        if (! empty($cruds)) {
220
+        if (!empty($cruds)) {
221 221
             $crudPanel = reset($cruds);
222 222
 
223 223
             return $crudPanel;
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.