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
Pull Request — master (#2508)
by Cristian
15:06
created
src/app/Http/Controllers/Operations/FetchOperation.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         // otherwise assume the arguments are actually the configuration array
46 46
         $config = [];
47 47
 
48
-        if (! is_array($arg)) {
49
-            if (! class_exists($arg)) {
48
+        if (!is_array($arg)) {
49
+            if (!class_exists($arg)) {
50 50
                 return response()->json(['error' => 'Class: '.$arg.' does not exists'], 500);
51 51
             }
52 52
             $config['model'] = $arg;
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         if ($search_string === false) {
68 68
             return ($config['paginate'] !== false) ?
69
-            $config['query']->paginate($config['paginate']) :
70
-            $config['query']->get();
69
+            $config['query']->paginate($config['paginate']) : $config['query']->get();
71 70
         }
72 71
 
73 72
         $textColumnTypes = ['string', 'json_string', 'text'];
@@ -85,7 +84,6 @@  discard block
 block discarded – undo
85 84
 
86 85
         // return the results with or without pagination
87 86
         return ($config['paginate'] !== false) ?
88
-                    $config['query']->paginate($config['paginate']) :
89
-                    $config['query']->get();
87
+                    $config['query']->paginate($config['paginate']) : $config['query']->get();
90 88
     }
91 89
 }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php 1 patch
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
         // make sure the column has a priority in terms of visibility
52 52
         // if no priority has been defined, use the order in the array plus one
53
-        if (! array_key_exists('priority', $column)) {
53
+        if (!array_key_exists('priority', $column)) {
54 54
             $position_in_columns_array = (int) array_search($column['key'], array_keys($this->columns()));
55 55
             $allColumns[$column['key']]['priority'] = $position_in_columns_array + 1;
56 56
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $column = ['name' => $column];
72 72
         }
73 73
 
74
-        if (is_array($column) && ! isset($column['name'])) {
74
+        if (is_array($column) && !isset($column['name'])) {
75 75
             $column['name'] = 'anonymous_column_'.Str::random(5);
76 76
         }
77 77
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected function makeSureColumnHasLabel($column)
89 89
     {
90
-        if (! isset($column['label'])) {
90
+        if (!isset($column['label'])) {
91 91
             $column['label'] = mb_ucfirst($this->makeLabel($column['name']));
92 92
         }
93 93
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     protected function makeSureColumnHasType($column)
104 104
     {
105
-        if (! isset($column['type'])) {
105
+        if (!isset($column['type'])) {
106 106
             $column['type'] = 'text';
107 107
         }
108 108
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     protected function makeSureColumnHasKey($column)
121 121
     {
122
-        if (! isset($column['key'])) {
122
+        if (!isset($column['key'])) {
123 123
             $column['key'] = str_replace('.', '__', $column['name']);
124 124
         }
125 125
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     protected function makeSureColumnHasWrapper($column)
139 139
     {
140
-        if (! isset($column['wrapper'])) {
140
+        if (!isset($column['wrapper'])) {
141 141
             $column['wrapper'] = [];
142 142
         }
143 143
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     {
156 156
         // if this is a relation type field and no corresponding model was specified,
157 157
         // get it from the relation method defined in the main model
158
-        if (isset($column['entity']) && ! isset($column['model'])) {
158
+        if (isset($column['entity']) && !isset($column['model'])) {
159 159
             $column['model'] = $this->getRelationModel($column['entity']);
160 160
         }
161 161
 
@@ -176,8 +176,7 @@  discard block
 block discarded – undo
176 176
         $columnsArray = $this->columns();
177 177
 
178 178
         if (array_key_exists($targetColumnName, $columnsArray)) {
179
-            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) :
180
-                array_search($targetColumnName, array_keys($columnsArray)) + 1;
179
+            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1;
181 180
 
182 181
             $element = array_pop($columnsArray);
183 182
             $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true);
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             return ['name' => $field];
42 42
         }
43 43
 
44
-        if (is_array($field) && ! isset($field['name'])) {
44
+        if (is_array($field) && !isset($field['name'])) {
45 45
             abort(500, 'All fields must have their name defined');
46 46
         }
47 47
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     protected function makeSureFieldHasRelationshipData($field)
104 104
     {
105 105
         // only do this if "entity" is defined on the field
106
-        if (! isset($field['entity'])) {
106
+        if (!isset($field['entity'])) {
107 107
             return $field;
108 108
         }
109 109
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         // if this is a relation type field and no corresponding model was specified,
124 124
         // get it from the relation method defined in the main model
125
-        if (isset($field['entity']) && ! isset($field['model'])) {
125
+        if (isset($field['entity']) && !isset($field['model'])) {
126 126
             $field['model'] = $this->getRelationModel($field['entity']);
127 127
         }
128 128
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     {
134 134
         // if there's a model defined, but no attribute
135 135
         // guess an attribute using the indentifiableAttribute functionality in CrudTrait
136
-        if (isset($field['model']) && ! isset($field['attribute'])) {
136
+        if (isset($field['model']) && !isset($field['attribute'])) {
137 137
             $field['attribute'] = call_user_func([(new $field['model']), 'identifiableAttribute']);
138 138
         }
139 139
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     protected function makeSureFieldHasLabel($field)
151 151
     {
152
-        if (! isset($field['label'])) {
152
+        if (!isset($field['label'])) {
153 153
             $name = is_array($field['name']) ? $field['name'][0] : $field['name'];
154 154
             $name = str_replace('_id', '', $name);
155 155
             $field['label'] = mb_ucfirst(str_replace('_', ' ', $name));
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      */
168 168
     protected function makeSureFieldHasType($field)
169 169
     {
170
-        if (! isset($field['type'])) {
170
+        if (!isset($field['type'])) {
171 171
             $field['type'] = $this->inferFieldTypeFromDbColumnType($field['name']);
172 172
         }
173 173
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         // if a tab was mentioned, we should enable it
186 186
         if (isset($field['tab'])) {
187
-            if (! $this->tabsEnabled()) {
187
+            if (!$this->tabsEnabled()) {
188 188
                 $this->enableTabs();
189 189
             }
190 190
         }
Please login to merge, or discard this patch.
src/app/Console/Commands/Traits/PrettyCommandOutput.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $command = is_string($command) ? explode(' ', $command) : $command;
27 27
 
28 28
         $process = new Process($command, null, null, null, $this->option('timeout'));
29
-        $process->run(function ($type, $buffer) {
29
+        $process->run(function($type, $buffer) {
30 30
             if (Process::ERR === $type) {
31 31
                 $this->echo('comment', $buffer);
32 32
             } else {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         });
36 36
 
37 37
         // executes after the command finishes
38
-        if (! $process->isSuccessful()) {
38
+        if (!$process->isSuccessful()) {
39 39
             throw new ProcessFailedException($process);
40 40
         }
41 41
 
Please login to merge, or discard this patch.
src/BackpackServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,18 +57,18 @@  discard block
 block discarded – undo
57 57
     public function register()
58 58
     {
59 59
         // Bind the CrudPanel object to Laravel's service container
60
-        $this->app->singleton('crud', function ($app) {
60
+        $this->app->singleton('crud', function($app) {
61 61
             return new CrudPanel($app);
62 62
         });
63 63
 
64 64
         // Bind the widgets collection object to Laravel's service container
65
-        $this->app->singleton('widgets', function ($app) {
65
+        $this->app->singleton('widgets', function($app) {
66 66
             return new Collection();
67 67
         });
68 68
 
69 69
         // load a macro for Route,
70 70
         // helps developers load all routes for a CRUD resource in one line
71
-        if (! Route::hasMacro('crud')) {
71
+        if (!Route::hasMacro('crud')) {
72 72
             $this->addRouteMacro();
73 73
         }
74 74
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $middleware_key = config('backpack.base.middleware_key');
85 85
         $middleware_class = config('backpack.base.middleware_class');
86 86
 
87
-        if (! is_array($middleware_class)) {
87
+        if (!is_array($middleware_class)) {
88 88
             $router->pushMiddlewareToGroup($middleware_key, $middleware_class);
89 89
 
90 90
             return;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     private function addRouteMacro()
184 184
     {
185
-        Route::macro('crud', function ($name, $controller) {
185
+        Route::macro('crud', function($name, $controller) {
186 186
             // put together the route name prefix,
187 187
             // as passed to the Route::group() statements
188 188
             $routeName = '';
Please login to merge, or discard this patch.
src/app/Library/Widget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
     {
145 145
         $itemExists = $this->collection()->contains('name', $this->attributes['name']);
146 146
 
147
-        if (! $itemExists) {
147
+        if (!$itemExists) {
148 148
             $this->collection()->put($this->attributes['name'], $this);
149 149
         } else {
150 150
             $this->collection()[$this->name] = $this;
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/ShowOperation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,21 +30,21 @@
 block discarded – undo
30 30
         $this->crud->allowAccess('show');
31 31
         $this->crud->setOperationSetting('setFromDb', true);
32 32
 
33
-        $this->crud->operation('show', function () {
33
+        $this->crud->operation('show', function() {
34 34
             $this->crud->loadDefaultOperationSettingsFromConfig();
35 35
         });
36 36
 
37
-        $this->crud->operation('list', function () {
37
+        $this->crud->operation('list', function() {
38 38
             $this->crud->addButton('line', 'show', 'view', 'crud::buttons.show', 'beginning');
39 39
         });
40 40
 
41
-        $this->crud->operation(['create', 'update'], function () {
41
+        $this->crud->operation(['create', 'update'], function() {
42 42
             $this->crud->addSaveAction([
43 43
                 'name' => 'save_and_preview',
44
-                'visible' => function ($crud) {
44
+                'visible' => function($crud) {
45 45
                     return $crud->hasAccess('show');
46 46
                 },
47
-                'redirect' => function ($crud, $request, $itemId = null) {
47
+                'redirect' => function($crud, $request, $itemId = null) {
48 48
                     $itemId = $itemId ?: $request->input('id');
49 49
                     $redirectUrl = $crud->route.'/'.$itemId.'/show';
50 50
                     if ($request->has('locale')) {
Please login to merge, or discard this patch.
src/resources/views/crud/fields/table.blade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 <?php
4 4
     $max = isset($field['max']) && (int) $field['max'] > 0 ? $field['max'] : -1;
5 5
     $min = isset($field['min']) && (int) $field['min'] > 0 ? $field['min'] : -1;
6
-    $item_name = strtolower(isset($field['entity_singular']) && ! empty($field['entity_singular']) ? $field['entity_singular'] : $field['label']);
6
+    $item_name = strtolower(isset($field['entity_singular']) && !empty($field['entity_singular']) ? $field['entity_singular'] : $field['label']);
7 7
 
8 8
     $items = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '';
9 9
 
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
         } else {
16 16
             $items = '[]';
17 17
         }
18
-    } elseif (is_string($items) && ! is_array(json_decode($items))) {
18
+    } elseif (is_string($items) && !is_array(json_decode($items))) {
19 19
         $items = '[]';
20 20
     }
21 21
 
22 22
     // make sure columns are defined
23
-    if (! isset($field['columns'])) {
23
+    if (!isset($field['columns'])) {
24 24
         $field['columns'] = ['value' => 'Value'];
25 25
     }
26 26
 
Please login to merge, or discard this patch.
tests/Unit/CrudPanel/BaseCrudPanelTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         parent::setUp();
26 26
 
27
-        $this->app->singleton('crud', function ($app) {
27
+        $this->app->singleton('crud', function($app) {
28 28
             return new CrudPanel($app);
29 29
         });
30 30
         $this->crudPanel = app('crud');
Please login to merge, or discard this patch.