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

Completed
Pull Request — master (#1935)
by Cristian
03:28
created
src/resources/views/fields/datetime_picker.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@
 block discarded – undo
3 3
 <?php
4 4
 // if the column has been cast to Carbon or Date (using attribute casting)
5 5
 // get the value as a date string
6
-if (isset($field['value']) && ( $field['value'] instanceof \Carbon\CarbonInterface )) {
6
+if (isset($field['value']) && ($field['value'] instanceof \Carbon\CarbonInterface)) {
7 7
     $field['value'] = $field['value']->format('Y-m-d H:i:s');
8 8
 }
9 9
 
10
-    $field_language = isset($field['datetime_picker_options']['language'])?$field['datetime_picker_options']['language']:\App::getLocale();
10
+    $field_language = isset($field['datetime_picker_options']['language']) ? $field['datetime_picker_options']['language'] : \App::getLocale();
11 11
 ?>
12 12
 
13 13
 <div @include('crud::inc.field_wrapper_attributes') >
Please login to merge, or discard this patch.
src/CrudTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array');
70 70
         $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'json_array');
71 71
 
72
-        return ! $conn->getDoctrineColumn($table, $column_name)->getNotnull();
72
+        return !$conn->getDoctrineColumn($table, $column_name)->getNotnull();
73 73
     }
74 74
 
75 75
     /*
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function addFakes($columns = ['extras'])
87 87
     {
88 88
         foreach ($columns as $key => $column) {
89
-            if (! isset($this->attributes[$column])) {
89
+            if (!isset($this->attributes[$column])) {
90 90
                 continue;
91 91
             }
92 92
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function shouldDecodeFake($column)
136 136
     {
137
-        return ! in_array($column, array_keys($this->casts));
137
+        return !in_array($column, array_keys($this->casts));
138 138
     }
139 139
 
140 140
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function shouldEncodeFake($column)
147 147
     {
148
-        return ! in_array($column, array_keys($this->casts));
148
+        return !in_array($column, array_keys($this->casts));
149 149
     }
150 150
 
151 151
     /*
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     public function uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path)
220 220
     {
221 221
         $request = \Request::instance();
222
-        if (! is_array($this->{$attribute_name})) {
222
+        if (!is_array($this->{$attribute_name})) {
223 223
             $attribute_value = json_decode($this->{$attribute_name}, true) ?? [];
224 224
         } else {
225 225
             $attribute_value = $this->{$attribute_name};
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         if ($files_to_clear) {
232 232
             foreach ($files_to_clear as $key => $filename) {
233 233
                 \Storage::disk($disk)->delete($filename);
234
-                $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) {
234
+                $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) {
235 235
                     return $value != $filename;
236 236
                 });
237 237
             }
Please login to merge, or discard this patch.
src/CrudServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
     public function register()
87 87
     {
88 88
         // Bind the CrudPanel object to Laravel's service container
89
-        $this->app->singleton('crud', function ($app) {
89
+        $this->app->singleton('crud', function($app) {
90 90
             return new CrudPanel($app);
91 91
         });
92 92
 
93 93
         // load a macro for Route,
94 94
         // for developers to be able to load all routes for a CRUD resource in one line
95
-        if (! Route::hasMacro('crud')) {
95
+        if (!Route::hasMacro('crud')) {
96 96
             $this->addRouteMacro();
97 97
         }
98 98
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $this->commands($this->commands);
104 104
 
105 105
         // map the elfinder prefix
106
-        if (! \Config::get('elfinder.route.prefix')) {
106
+        if (!\Config::get('elfinder.route.prefix')) {
107 107
             \Config::set('elfinder.route.prefix', \Config::get('backpack.base.route_prefix').'/elfinder');
108 108
         }
109 109
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     private function addRouteMacro()
118 118
     {
119
-        Route::macro('crud', function ($name, $controller) {
119
+        Route::macro('crud', function($name, $controller) {
120 120
             // put together the route name prefix,
121 121
             // as passed to the Route::group() statements
122 122
             $routeName = '';
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     {
163 163
         $crudPubPath = public_path('vendor/backpack/crud');
164 164
 
165
-        if (! is_dir($crudPubPath)) {
165
+        if (!is_dir($crudPubPath)) {
166 166
             return true;
167 167
         }
168 168
 
Please login to merge, or discard this patch.
src/PanelTraits/SaveActions.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 
25 25
         $saveOptions = collect($permissions)
26 26
             // Restrict list to allowed actions.
27
-            ->filter(function ($action, $permission) {
27
+            ->filter(function($action, $permission) {
28 28
                 return $this->hasAccess($permission);
29 29
             })
30 30
             // Generate list of possible actions.
31
-            ->mapWithKeys(function ($action, $permission) {
31
+            ->mapWithKeys(function($action, $permission) {
32 32
                 return [$action => $this->getSaveActionButtonName($action)];
33 33
             })
34 34
             ->all();
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function setSaveAction($forceSaveAction = null)
65 65
     {
66
-        $saveAction = $forceSaveAction ?:
67
-            \Request::input('save_action', config('backpack.crud.default_save_action', 'save_and_back'));
66
+        $saveAction = $forceSaveAction ?: \Request::input('save_action', config('backpack.crud.default_save_action', 'save_and_back'));
68 67
 
69 68
         if (config('backpack.crud.show_save_action_change', true) &&
70 69
             session('save_action', 'save_and_back') !== $saveAction) {
Please login to merge, or discard this patch.
src/CrudPanel.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function setModel($model_namespace)
78 78
     {
79
-        if (! class_exists($model_namespace)) {
79
+        if (!class_exists($model_namespace)) {
80 80
             throw new \Exception('The model does not exist.', 500);
81 81
         }
82 82
 
83
-        if (! method_exists($model_namespace, 'hasCrudTrait')) {
83
+        if (!method_exists($model_namespace, 'hasCrudTrait')) {
84 84
             throw new \Exception('Please use CrudTrait on the model.', 500);
85 85
         }
86 86
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     {
144 144
         $complete_route = $route.'.index';
145 145
 
146
-        if (! \Route::has($complete_route)) {
146
+        if (!\Route::has($complete_route)) {
147 147
             throw new \Exception('There are no routes for this route name.', 404);
148 148
         }
149 149
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      */
245 245
     public function getFirstOfItsTypeInArray($type, $array)
246 246
     {
247
-        return array_first($array, function ($item) use ($type) {
247
+        return array_first($array, function($item) use ($type) {
248 248
             return $item['type'] == $type;
249 249
         });
250 250
     }
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
 
262 262
     public function sync($type, $fields, $attributes)
263 263
     {
264
-        if (! empty($this->{$type})) {
265
-            $this->{$type} = array_map(function ($field) use ($fields, $attributes) {
264
+        if (!empty($this->{$type})) {
265
+            $this->{$type} = array_map(function($field) use ($fields, $attributes) {
266 266
                 if (in_array($field['name'], (array) $fields)) {
267 267
                     $field = array_merge($field, $attributes);
268 268
                 }
@@ -294,15 +294,15 @@  discard block
 block discarded – undo
294 294
     {
295 295
         $relationArray = explode('.', $relationString);
296 296
 
297
-        if (! isset($length)) {
297
+        if (!isset($length)) {
298 298
             $length = count($relationArray);
299 299
         }
300 300
 
301
-        if (! isset($model)) {
301
+        if (!isset($model)) {
302 302
             $model = $this->model;
303 303
         }
304 304
 
305
-        $result = array_reduce(array_splice($relationArray, 0, $length), function ($obj, $method) {
305
+        $result = array_reduce(array_splice($relationArray, 0, $length), function($obj, $method) {
306 306
             return $obj->$method()->getRelated();
307 307
         }, $model);
308 308
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
         $relation = $model->{$firstRelationName};
353 353
 
354 354
         $results = [];
355
-        if (! empty($relation)) {
355
+        if (!empty($relation)) {
356 356
             if ($relation instanceof Collection) {
357 357
                 $currentResults = $relation->toArray();
358 358
             } else {
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
             array_shift($relationArray);
363 363
 
364
-            if (! empty($relationArray)) {
364
+            if (!empty($relationArray)) {
365 365
                 foreach ($currentResults as $currentResult) {
366 366
                     $results = array_merge($results, $this->getRelationModelInstances($currentResult, implode('.', $relationArray)));
367 367
                 }
Please login to merge, or discard this patch.
src/PanelTraits/HeadingsAndTitles.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function getTitle($action = false)
23 23
     {
24
-        if (! $action) {
24
+        if (!$action) {
25 25
             $action = $this->getActionMethod();
26 26
         }
27 27
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function setTitle($string, $action = false)
40 40
     {
41
-        if (! $action) {
41
+        if (!$action) {
42 42
             $action = $this->getActionMethod();
43 43
         }
44 44
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function getHeading($action = false)
60 60
     {
61
-        if (! $action) {
61
+        if (!$action) {
62 62
             $action = $this->getActionMethod();
63 63
         }
64 64
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function setHeading($string, $action = false)
77 77
     {
78
-        if (! $action) {
78
+        if (!$action) {
79 79
             $action = $this->getActionMethod();
80 80
         }
81 81
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function getSubheading($action = false)
97 97
     {
98
-        if (! $action) {
98
+        if (!$action) {
99 99
             $action = $this->getActionMethod();
100 100
         }
101 101
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function setSubheading($string, $action = false)
114 114
     {
115
-        if (! $action) {
115
+        if (!$action) {
116 116
             $action = $this->getActionMethod();
117 117
         }
118 118
 
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/ReorderOperation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $this->crud->set('reorder.enabled', true);
37 37
         $this->crud->allowAccess('reorder');
38 38
 
39
-        $this->crud->operation('list', function () {
39
+        $this->crud->operation('list', function() {
40 40
             $this->crud->addButton('top', 'reorder', 'view', 'crud::buttons.reorder');
41 41
         });
42 42
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $this->crud->applyConfigurationFromSettings('reorder');
54 54
         $this->crud->hasAccessOrFail('reorder');
55 55
 
56
-        if (! $this->crud->isReorderEnabled()) {
56
+        if (!$this->crud->isReorderEnabled()) {
57 57
             abort(403, 'Reorder is disabled.');
58 58
         }
59 59
 
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/UpdateOperation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
     {
43 43
         $this->crud->allowAccess('update');
44 44
 
45
-        $this->crud->operation('update', function () {
45
+        $this->crud->operation('update', function() {
46 46
             $this->crud->set('update.groupedErrors', config('backpack.crud.show_grouped_errors', true));
47 47
             $this->crud->set('update.inlineErrors', config('backpack.crud.show_inline_errors', true));
48 48
             $this->crud->set('update.autoFocusOnFirstField', true);
49 49
         });
50 50
 
51
-        $this->crud->operation(['list', 'show'], function () {
51
+        $this->crud->operation(['list', 'show'], function() {
52 52
             $this->crud->addButton('line', 'update', 'view', 'crud::buttons.update', 'end');
53 53
         });
54 54
     }
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/BulkCloneOperation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $this->crud->allowAccess('bulkClone');
31 31
 
32
-        $this->crud->operation('list', function () {
32
+        $this->crud->operation('list', function() {
33 33
             $this->crud->enableBulkActions();
34 34
             $this->crud->addButton('bottom', 'bulk_clone', 'view', 'crud::buttons.bulk_clone', 'beginning');
35 35
         });
Please login to merge, or discard this patch.