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 (#2266)
by Cristian
02:27
created
src/app/Library/CrudPanel/Traits/Filters.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $this->enableFilters();
60 60
 
61 61
         // check if another filter with the same name exists
62
-        if (! isset($options['name'])) {
62
+        if (!isset($options['name'])) {
63 63
             abort(500, 'All your filters need names.');
64 64
         }
65 65
         if ($this->filters()->contains('name', $options['name'])) {
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $filter = $this->filters()->firstWhere('name', $name);
203 203
 
204
-        if (! $filter) {
204
+        if (!$filter) {
205 205
             abort(500, 'CRUD Filter "'.$name.'" not found. Please check the filter exists before you modify it.');
206 206
         }
207 207
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
     public function removeFilter($name)
218 218
     {
219
-        $strippedFiltersCollection = $this->filters()->reject(function ($filter) use ($name) {
219
+        $strippedFiltersCollection = $this->filters()->reject(function($filter) use ($name) {
220 220
             return $filter->name == $name;
221 221
         });
222 222
 
@@ -278,16 +278,16 @@  discard block
 block discarded – undo
278 278
 
279 279
     public function checkOptionsIntegrity($options)
280 280
     {
281
-        if (! isset($options['name'])) {
281
+        if (!isset($options['name'])) {
282 282
             abort(500, 'Please make sure all your filters have names.');
283 283
         }
284
-        if (! isset($options['type'])) {
284
+        if (!isset($options['type'])) {
285 285
             abort(500, 'Please make sure all your filters have types.');
286 286
         }
287
-        if (! \View::exists('crud::filters.'.$options['type'])) {
287
+        if (!\View::exists('crud::filters.'.$options['type'])) {
288 288
             abort(500, 'No filter view named "'.$options['type'].'.blade.php" was found.');
289 289
         }
290
-        if (! isset($options['label'])) {
290
+        if (!isset($options['label'])) {
291 291
             abort(500, 'Please make sure all your filters have labels.');
292 292
         }
293 293
     }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Query.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     public function customOrderBy($column, $columnDirection = 'asc')
70 70
     {
71
-        if (! isset($column['orderLogic'])) {
71
+        if (!isset($column['orderLogic'])) {
72 72
             return $this->query;
73 73
         }
74 74
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      * Order results of the query in a custom way.
66 66
      *
67 67
      * @param array  $column           Column array with all attributes
68
-     * @param string $column_direction ASC or DESC
68
+     * @param string $columnDirection ASC or DESC
69 69
      *
70 70
      * @return \Illuminate\Database\Eloquent\Builder
71 71
      */
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Validation.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
      */
95 95
     public function isRequired($inputKey)
96 96
     {
97
-        if (! $this->hasOperationSetting('requiredFields')) {
97
+        if (!$this->hasOperationSetting('requiredFields')) {
98 98
             return false;
99 99
         }
100 100
 
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,6 @@
 block discarded – undo
107 107
      * for the given operation.
108 108
      *
109 109
      * @param string $inputKey  Field or input name.
110
-     * @param string $operation create / update
111 110
      *
112 111
      * @return bool
113 112
      */
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/FakeColumns.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,19 +24,19 @@
 block discarded – undo
24 24
             if (isset($field['fake']) && $field['fake'] == true) {
25 25
                 // add it to the request in its appropriate variable - the one defined, if defined
26 26
                 if (isset($field['store_in'])) {
27
-                    if (! in_array($field['store_in'], $fakeFieldsColumnsArray, true)) {
27
+                    if (!in_array($field['store_in'], $fakeFieldsColumnsArray, true)) {
28 28
                         array_push($fakeFieldsColumnsArray, $field['store_in']);
29 29
                     }
30 30
                 } else {
31 31
                     //otherwise in the one defined in the $crud variable
32
-                    if (! in_array('extras', $fakeFieldsColumnsArray, true)) {
32
+                    if (!in_array('extras', $fakeFieldsColumnsArray, true)) {
33 33
                         array_push($fakeFieldsColumnsArray, 'extras');
34 34
                     }
35 35
                 }
36 36
             }
37 37
         }
38 38
 
39
-        if (! count($fakeFieldsColumnsArray)) {
39
+        if (!count($fakeFieldsColumnsArray)) {
40 40
             $fakeFieldsColumnsArray = ['extras'];
41 41
         }
42 42
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/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/app/Http/Requests/ChangePasswordRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
      */
42 42
     public function withValidator($validator)
43 43
     {
44
-        $validator->after(function ($validator) {
44
+        $validator->after(function($validator) {
45 45
             // check old password matches
46
-            if (! Hash::check($this->input('old_password'), backpack_auth()->user()->password)) {
46
+            if (!Hash::check($this->input('old_password'), backpack_auth()->user()->password)) {
47 47
                 $validator->errors()->add('old_password', trans('backpack::base.old_password_incorrect'));
48 48
             }
49 49
         });
Please login to merge, or discard this patch.
src/config/backpack/base.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
     ],
44 44
 
45 45
     // CSS files that are loaded in all pages, using Laravel's mix() helper
46
-    'mix_styles' => [ // file_path => manifest_directory_path
46
+    'mix_styles' => [// file_path => manifest_directory_path
47 47
         // 'css/app.css' => '',
48 48
     ],
49 49
 
Please login to merge, or discard this patch.
src/Stats.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     private function sendUsageStats()
39 39
     {
40 40
         // only send usage stats in production
41
-        if (! $this->runningInProduction()) {
41
+        if (!$this->runningInProduction()) {
42 42
             return;
43 43
         }
44 44
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
      * Check if the application is running in normal conditions
9 9
      * (production env, not in console, not in unit tests).
10 10
      *
11
-     * @return void
11
+     * @return boolean
12 12
      */
13 13
     private function runningInProduction()
14 14
     {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @param string $url     URL to point the request at.
86 86
      * @param array  $payload The data you want sent to the URL.
87 87
      *
88
-     * @return void
88
+     * @return boolean
89 89
      */
90 90
     private function makeCurlRequest($method, $url, $payload)
91 91
     {
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Read.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -175,6 +175,7 @@
 block discarded – undo
175 175
 
176 176
     /**
177 177
      * Set the number of rows that should be show on the list view.
178
+     * @param integer $value
178 179
      */
179 180
     public function setDefaultPageLength($value)
180 181
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $id = $this->getCurrentEntryId();
40 40
 
41
-        if (! $id) {
41
+        if (!$id) {
42 42
             return false;
43 43
         }
44 44
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getEntry($id)
56 56
     {
57
-        if (! $this->entry) {
57
+        if (!$this->entry) {
58 58
             $this->entry = $this->model->findOrFail($id);
59 59
             $this->entry = $this->entry->withFakes();
60 60
         }
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     {
204 204
         // If the default Page Length isn't in the menu's values, Add it the beginnin and resort all to show a croissant list.
205 205
         // assume both arrays are the same length.
206
-        if (! in_array($this->getDefaultPageLength(), $this->getOperationSetting('pageLengthMenu')[0])) {
206
+        if (!in_array($this->getDefaultPageLength(), $this->getOperationSetting('pageLengthMenu')[0])) {
207 207
             // Loop through 2 arrays of prop. pageLengthMenu
208 208
             foreach ($this->getOperationSetting('pageLengthMenu') as $key => &$page_length_choices) {
209 209
                 // This is a condition that should be always true.
Please login to merge, or discard this patch.