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
Push — master ( 7067d4...3bce24 )
by Cristian
10:36 queued 04:56
created
src/app/Models/Traits/InheritsRelationsFromParentModel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
 
18 18
     public static function bootHasParent()
19 19
     {
20
-        static::creating(function ($model) {
20
+        static::creating(function($model) {
21 21
             if ($model->parentHasHasChildrenTrait()) {
22 22
                 $model->forceFill(
23 23
                     [$model->getInheritanceColumn() => $model->classToAlias(get_class($model))]
24 24
                 );
25 25
             }
26 26
         });
27
-        static::addGlobalScope(function ($query) {
27
+        static::addGlobalScope(function($query) {
28 28
             $instance = new static();
29 29
             if ($instance->parentHasHasChildrenTrait()) {
30 30
                 $query->where($instance->getTable().'.'.$instance->getInheritanceColumn(), $instance->classToAlias(get_class($instance)));
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function getTable()
41 41
     {
42
-        if (! isset($this->table)) {
42
+        if (!isset($this->table)) {
43 43
             return str_replace('\\', '', snake_case(str_plural(class_basename($this->getParentClass()))));
44 44
         }
45 45
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/SaveActions.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 
34 34
         $saveOptions = collect($permissions)
35 35
             // Restrict list to allowed actions.
36
-            ->filter(function ($action, $permission) {
36
+            ->filter(function($action, $permission) {
37 37
                 return $this->hasAccess($permission);
38 38
             })
39 39
             // Generate list of possible actions.
40
-            ->mapWithKeys(function ($action, $permission) {
40
+            ->mapWithKeys(function($action, $permission) {
41 41
                 return [$action => $this->getSaveActionButtonName($action)];
42 42
             })
43 43
             ->all();
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function setSaveAction($forceSaveAction = null)
75 75
     {
76
-        $saveAction = $forceSaveAction ?:
77
-            \Request::input('save_action', $this->getSaveActionDefaultForCurrentOperation());
76
+        $saveAction = $forceSaveAction ?: \Request::input('save_action', $this->getSaveActionDefaultForCurrentOperation());
78 77
 
79 78
         $showBubble = $this->getOperationSetting('showSaveActionChange') ?? config('backpack.crud.operations.'.$this->getCurrentOperation().'.showSaveActionChange') ?? true;
80 79
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/AutoSet.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 
128 128
                 case 'boolean':
129 129
                        return 'boolean';
130
-                       break;
130
+                        break;
131 131
 
132 132
                 case 'tinyint':
133 133
                     return 'active';
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function setFromDb()
14 14
     {
15
-        if (! $this->driverIsMongoDb()) {
15
+        if (!$this->driverIsMongoDb()) {
16 16
             $this->setDoctrineTypesMapping();
17 17
             $this->getDbColumnTypes();
18 18
         }
19 19
 
20
-        array_map(function ($field) {
20
+        array_map(function($field) {
21 21
             $new_field = [
22 22
                 'name'       => $field,
23 23
                 'label'      => $this->makeLabel($field),
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
                 'autoset'    => true,
30 30
             ];
31 31
 
32
-            if (! isset($this->fields()[$field])) {
32
+            if (!isset($this->fields()[$field])) {
33 33
                 $this->addField($new_field);
34 34
             }
35 35
 
36
-            if (! in_array($field, $this->model->getHidden()) && ! in_array($field, $this->columns())) {
36
+            if (!in_array($field, $this->model->getHidden()) && !in_array($field, $this->columns())) {
37 37
                 $this->addColumn([
38 38
                     'name'    => $field,
39 39
                     'label'   => $this->makeLabel($field),
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $types = ['enum' => 'string'];
172 172
         $platform = $this->getSchema()->getConnection()->getDoctrineConnection()->getDatabasePlatform();
173 173
         foreach ($types as $type_key => $type_value) {
174
-            if (! $platform->hasDoctrineTypeMappingFor($type_key)) {
174
+            if (!$platform->hasDoctrineTypeMappingFor($type_key)) {
175 175
                 $platform->registerDoctrineTypeMapping($type_key, $type_value);
176 176
             }
177 177
         }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             // Automatically-set columns should be both in the database, and in the $fillable variable on the Eloquent Model
231 231
             $columns = $this->model->getConnection()->getSchemaBuilder()->getColumnListing($this->model->getTable());
232 232
 
233
-            if (! empty($fillable)) {
233
+            if (!empty($fillable)) {
234 234
                 $columns = array_intersect($columns, $fillable);
235 235
             }
236 236
         }
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/DeleteOperation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
     {
30 30
         $this->crud->allowAccess('delete');
31 31
 
32
-        $this->crud->operation('delete', function () {
32
+        $this->crud->operation('delete', function() {
33 33
             $this->crud->loadDefaultOperationSettingsFromConfig();
34 34
         });
35 35
 
36
-        $this->crud->operation(['list', 'show'], function () {
36
+        $this->crud->operation(['list', 'show'], function() {
37 37
             $this->crud->addButton('line', 'delete', 'view', 'crud::buttons.delete', 'end');
38 38
         });
39 39
     }
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/ShowOperation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 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
     }
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/RevisionsOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
         // allow access to the operation
37 37
         $this->crud->allowAccess('revisions');
38 38
 
39
-        $this->crud->operation('revisions', function () {
39
+        $this->crud->operation('revisions', function() {
40 40
             $this->crud->loadDefaultOperationSettingsFromConfig();
41 41
         });
42 42
 
43
-        $this->crud->operation(['list', 'show'], function () {
43
+        $this->crud->operation(['list', 'show'], function() {
44 44
             // add a button in the line stack
45 45
             $this->crud->addButton('line', 'revisions', 'view', 'crud::buttons.revisions', 'end');
46 46
         });
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->crud->hasAccessOrFail('revisions');
89 89
 
90 90
         $revisionId = \Request::input('revision_id', false);
91
-        if (! $revisionId) {
91
+        if (!$revisionId) {
92 92
             abort(500, 'Can\'t restore revision without revision_id');
93 93
         } else {
94 94
             $this->crud->restoreRevision($id, $revisionId); // do the update
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/CreateOperation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@
 block discarded – undo
41 41
     {
42 42
         $this->crud->allowAccess('create');
43 43
 
44
-        $this->crud->operation('create', function () {
44
+        $this->crud->operation('create', function() {
45 45
             $this->crud->loadDefaultOperationSettingsFromConfig();
46 46
         });
47 47
 
48
-        $this->crud->operation('list', function () {
48
+        $this->crud->operation('list', function() {
49 49
             $this->crud->addButton('top', 'create', 'view', 'crud::buttons.create');
50 50
         });
51 51
     }
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/BulkDeleteOperation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
     {
30 30
         $this->crud->allowAccess('bulkDelete');
31 31
 
32
-        $this->crud->operation('bulkDelete', function () {
32
+        $this->crud->operation('bulkDelete', function() {
33 33
             $this->crud->loadDefaultOperationSettingsFromConfig();
34 34
         });
35 35
 
36
-        $this->crud->operation('list', function () {
36
+        $this->crud->operation('list', function() {
37 37
             $this->crud->enableBulkActions();
38 38
             $this->crud->addButton('bottom', 'bulk_delete', 'view', 'crud::buttons.bulk_delete');
39 39
         });
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Columns.php 2 patches
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function addColumn($column)
64 64
     {
65 65
         // if a string was passed, not an array, change it to an array
66
-        if (! is_array($column)) {
66
+        if (!is_array($column)) {
67 67
             $column = ['name' => $column];
68 68
         }
69 69
 
@@ -71,17 +71,17 @@  discard block
 block discarded – undo
71 71
         $column_with_details = $this->addDefaultLabel($column);
72 72
 
73 73
         // make sure the column has a name
74
-        if (! array_key_exists('name', $column_with_details)) {
74
+        if (!array_key_exists('name', $column_with_details)) {
75 75
             $column_with_details['name'] = 'anonymous_column_'.str_random(5);
76 76
         }
77 77
 
78 78
         // make sure the column has a type
79
-        if (! array_key_exists('type', $column_with_details)) {
79
+        if (!array_key_exists('type', $column_with_details)) {
80 80
             $column_with_details['type'] = 'text';
81 81
         }
82 82
 
83 83
         // make sure the column has a key
84
-        if (! array_key_exists('key', $column_with_details)) {
84
+        if (!array_key_exists('key', $column_with_details)) {
85 85
             $column_with_details['key'] = str_replace('.', '__', $column_with_details['name']);
86 86
         }
87 87
 
@@ -89,17 +89,17 @@  discard block
 block discarded – undo
89 89
         $columnExistsInDb = $this->hasColumn($this->model->getTable(), $column_with_details['name']);
90 90
 
91 91
         // make sure the column has a tableColumn boolean
92
-        if (! array_key_exists('tableColumn', $column_with_details)) {
92
+        if (!array_key_exists('tableColumn', $column_with_details)) {
93 93
             $column_with_details['tableColumn'] = $columnExistsInDb ? true : false;
94 94
         }
95 95
 
96 96
         // make sure the column has a orderable boolean
97
-        if (! array_key_exists('orderable', $column_with_details)) {
97
+        if (!array_key_exists('orderable', $column_with_details)) {
98 98
             $column_with_details['orderable'] = $columnExistsInDb ? true : false;
99 99
         }
100 100
 
101 101
         // make sure the column has a searchLogic
102
-        if (! array_key_exists('searchLogic', $column_with_details)) {
102
+        if (!array_key_exists('searchLogic', $column_with_details)) {
103 103
             $column_with_details['searchLogic'] = $columnExistsInDb ? true : false;
104 104
         }
105 105
 
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
 
109 109
         // make sure the column has a priority in terms of visibility
110 110
         // if no priority has been defined, use the order in the array plus one
111
-        if (! array_key_exists('priority', $column_with_details)) {
111
+        if (!array_key_exists('priority', $column_with_details)) {
112 112
             $position_in_columns_array = (int) array_search($column_with_details['key'], array_keys($this->columns()));
113 113
             $columnsArray[$column_with_details['key']]['priority'] = $position_in_columns_array + 1;
114 114
         }
115 115
 
116 116
         // if this is a relation type field and no corresponding model was specified, get it from the relation method
117 117
         // defined in the main model
118
-        if (isset($column_with_details['entity']) && ! isset($column_with_details['model'])) {
118
+        if (isset($column_with_details['entity']) && !isset($column_with_details['model'])) {
119 119
             $columnsArray[$column_with_details['key']]['model'] = $this->getRelationModel($column_with_details['entity']);
120 120
         }
121 121
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public function makeFirstColumn()
167 167
     {
168
-        if (! $this->columns()) {
168
+        if (!$this->columns()) {
169 169
             return false;
170 170
         }
171 171
 
@@ -187,8 +187,7 @@  discard block
 block discarded – undo
187 187
         $columnsArray = $this->columns();
188 188
 
189 189
         if (array_key_exists($targetColumnName, $columnsArray)) {
190
-            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) :
191
-                array_search($targetColumnName, array_keys($columnsArray)) + 1;
190
+            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1;
192 191
 
193 192
             $element = array_pop($columnsArray);
194 193
             $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true);
@@ -227,7 +226,7 @@  discard block
 block discarded – undo
227 226
      */
228 227
     public function addDefaultLabel($array)
229 228
     {
230
-        if (! array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) {
229
+        if (!array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) {
231 230
             $array = array_merge(['label' => mb_ucfirst($this->makeLabel($array['name']))], $array);
232 231
 
233 232
             return $array;
@@ -255,7 +254,7 @@  discard block
 block discarded – undo
255 254
      */
256 255
     public function removeColumns($columns)
257 256
     {
258
-        if (! empty($columns)) {
257
+        if (!empty($columns)) {
259 258
             foreach ($columns as $columnKey) {
260 259
                 $this->removeColumn($columnKey);
261 260
             }
@@ -334,7 +333,7 @@  discard block
 block discarded – undo
334 333
     {
335 334
         $columns = $this->columns();
336 335
 
337
-        return collect($columns)->pluck('entity')->reject(function ($value, $key) {
336
+        return collect($columns)->pluck('entity')->reject(function($value, $key) {
338 337
             return $value == null;
339 338
         })->toArray();
340 339
     }
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Move the most recently added column after the given target column.
143 143
      *
144
-     * @param string|array $targetColumn The target column name or array.
144
+     * @param string $targetColumn The target column name or array.
145 145
      */
146 146
     public function afterColumn($targetColumn)
147 147
     {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     /**
162 162
      * Move this column to be first in the columns list.
163 163
      *
164
-     * @return bool|null
164
+     * @return false|null
165 165
      */
166 166
     public function makeFirstColumn()
167 167
     {
Please login to merge, or discard this patch.