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 (#966)
by Cristian
02:29
created
src/PanelTraits/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/PanelTraits/Columns.php 1 patch
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function addColumn($column)
55 55
     {
56 56
         // if a string was passed, not an array, change it to an array
57
-        if (! is_array($column)) {
57
+        if (!is_array($column)) {
58 58
             $column = ['name' => $column];
59 59
         }
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $column_with_details = $this->addDefaultLabel($column);
63 63
 
64 64
         // make sure the column has a name
65
-        if (! array_key_exists('name', $column_with_details)) {
65
+        if (!array_key_exists('name', $column_with_details)) {
66 66
             $column_with_details['name'] = 'anonymous_column_'.str_random(5);
67 67
         }
68 68
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         // if this is a relation type field and no corresponding model was specified, get it from the relation method
72 72
         // defined in the main model
73
-        if (isset($column_with_details['entity']) && ! isset($column_with_details['model'])) {
73
+        if (isset($column_with_details['entity']) && !isset($column_with_details['model'])) {
74 74
             $column_with_details['model'] = $this->getRelationModel($column_with_details['entity']);
75 75
         }
76 76
 
@@ -124,8 +124,7 @@  discard block
 block discarded – undo
124 124
         $targetColumnName = is_array($targetColumn) ? $targetColumn['name'] : $targetColumn;
125 125
 
126 126
         if (array_key_exists($targetColumnName, $this->columns)) {
127
-            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($this->columns)) :
128
-                array_search($targetColumnName, array_keys($this->columns)) + 1;
127
+            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($this->columns)) : array_search($targetColumnName, array_keys($this->columns)) + 1;
129 128
 
130 129
             $element = array_pop($this->columns);
131 130
             $beginningPart = array_slice($this->columns, 0, $targetColumnPosition, true);
@@ -159,7 +158,7 @@  discard block
 block discarded – undo
159 158
      */
160 159
     public function addDefaultLabel($array)
161 160
     {
162
-        if (! array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) {
161
+        if (!array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) {
163 162
             $array = array_merge(['label' => ucfirst($this->makeLabel($array['name']))], $array);
164 163
 
165 164
             return $array;
@@ -193,8 +192,8 @@  discard block
 block discarded – undo
193 192
      */
194 193
     public function remove($entity, $fields)
195 194
     {
196
-        return array_values(array_filter($this->{$entity}, function ($field) use ($fields) {
197
-            return ! in_array($field['name'], (array) $fields);
195
+        return array_values(array_filter($this->{$entity}, function($field) use ($fields) {
196
+            return !in_array($field['name'], (array) $fields);
198 197
         }));
199 198
     }
200 199
 
@@ -245,7 +244,7 @@  discard block
 block discarded – undo
245 244
     {
246 245
         $columns = $this->getColumns();
247 246
 
248
-        return collect($columns)->pluck('entity')->reject(function ($value, $key) {
247
+        return collect($columns)->pluck('entity')->reject(function($value, $key) {
249 248
             return $value == null;
250 249
         })->toArray();
251 250
     }
Please login to merge, or discard this patch.
src/PanelTraits/FakeFields.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 $fakeFieldKey = isset($field['store_in']) ? $field['store_in'] : 'extras';
30 30
                 $this->addCompactedField($requestInput, $field['name'], $fakeFieldKey);
31 31
 
32
-                if (! in_array($fakeFieldKey, $compactedFakeFields)) {
32
+                if (!in_array($fakeFieldKey, $compactedFakeFields)) {
33 33
                     $compactedFakeFields[] = $fakeFieldKey;
34 34
                 }
35 35
             }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         // json_encode all fake_value columns in the database, so they can be properly stored and interpreted
39 39
         foreach ($compactedFakeFields as $value) {
40
-            if (! (property_exists($this->model, 'translatable') && in_array($value, $this->model->getTranslatableAttributes(), true))) {
40
+            if (!(property_exists($this->model, 'translatable') && in_array($value, $this->model->getTranslatableAttributes(), true))) {
41 41
                 $requestInput[$value] = json_encode($requestInput[$value]);
42 42
             }
43 43
         }
Please login to merge, or discard this patch.