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 ( 17a619...90edea )
by Cristian
03:17
created
src/PanelTraits/Columns.php 1 patch
Spacing   +17 added lines, -18 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function addColumn($column)
65 65
     {
66 66
         // if a string was passed, not an array, change it to an array
67
-        if (! is_array($column)) {
67
+        if (!is_array($column)) {
68 68
             $column = ['name' => $column];
69 69
         }
70 70
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $column_with_details = $this->addDefaultLabel($column);
73 73
 
74 74
         // make sure the column has a name
75
-        if (! array_key_exists('name', $column_with_details)) {
75
+        if (!array_key_exists('name', $column_with_details)) {
76 76
             $column_with_details['name'] = 'anonymous_column_'.str_random(5);
77 77
         }
78 78
 
@@ -80,35 +80,35 @@  discard block
 block discarded – undo
80 80
         $columnExistsInDb = $this->hasColumn($this->model->getTable(), $column_with_details['name']);
81 81
 
82 82
         // make sure the column has a type
83
-        if (! array_key_exists('type', $column_with_details)) {
83
+        if (!array_key_exists('type', $column_with_details)) {
84 84
             $column_with_details['type'] = 'text';
85 85
         }
86 86
 
87 87
         // make sure the column has a key
88
-        if (! array_key_exists('key', $column_with_details)) {
88
+        if (!array_key_exists('key', $column_with_details)) {
89 89
             $column_with_details['key'] = $column_with_details['name'];
90 90
         }
91 91
 
92 92
         // make sure the column has a tableColumn boolean
93
-        if (! array_key_exists('tableColumn', $column_with_details)) {
94
-            $column_with_details['tableColumn'] = $columnExistsInDb?true:false;
93
+        if (!array_key_exists('tableColumn', $column_with_details)) {
94
+            $column_with_details['tableColumn'] = $columnExistsInDb ?true:false;
95 95
         }
96 96
 
97 97
         // make sure the column has a orderable boolean
98
-        if (! array_key_exists('orderable', $column_with_details)) {
99
-            $column_with_details['orderable'] = $columnExistsInDb?true:false;
98
+        if (!array_key_exists('orderable', $column_with_details)) {
99
+            $column_with_details['orderable'] = $columnExistsInDb ?true:false;
100 100
         }
101 101
 
102 102
         // make sure the column has a searchLogic
103
-        if (! array_key_exists('searchLogic', $column_with_details)) {
104
-            $column_with_details['searchLogic'] = $columnExistsInDb?true:false;
103
+        if (!array_key_exists('searchLogic', $column_with_details)) {
104
+            $column_with_details['searchLogic'] = $columnExistsInDb ?true:false;
105 105
         }
106 106
 
107 107
         array_filter($this->columns[$column_with_details['key']] = $column_with_details);
108 108
 
109 109
         // if this is a relation type field and no corresponding model was specified, get it from the relation method
110 110
         // defined in the main model
111
-        if (isset($column_with_details['entity']) && ! isset($column_with_details['model'])) {
111
+        if (isset($column_with_details['entity']) && !isset($column_with_details['model'])) {
112 112
             $column_with_details['model'] = $this->getRelationModel($column_with_details['entity']);
113 113
         }
114 114
 
@@ -162,8 +162,7 @@  discard block
 block discarded – undo
162 162
         $targetColumnName = is_array($targetColumn) ? $targetColumn['name'] : $targetColumn;
163 163
 
164 164
         if (array_key_exists($targetColumnName, $this->columns)) {
165
-            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($this->columns)) :
166
-                array_search($targetColumnName, array_keys($this->columns)) + 1;
165
+            $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($this->columns)) : array_search($targetColumnName, array_keys($this->columns)) + 1;
167 166
 
168 167
             $element = array_pop($this->columns);
169 168
             $beginningPart = array_slice($this->columns, 0, $targetColumnPosition, true);
@@ -197,7 +196,7 @@  discard block
 block discarded – undo
197 196
      */
198 197
     public function addDefaultLabel($array)
199 198
     {
200
-        if (! array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) {
199
+        if (!array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) {
201 200
             $array = array_merge(['label' => ucfirst($this->makeLabel($array['name']))], $array);
202 201
 
203 202
             return $array;
@@ -223,7 +222,7 @@  discard block
 block discarded – undo
223 222
      */
224 223
     public function removeColumns($columns)
225 224
     {
226
-        if (! empty($columns)) {
225
+        if (!empty($columns)) {
227 226
             foreach ($columns as $columnName) {
228 227
                 $this->removeColumn($columnName);
229 228
             }
@@ -244,8 +243,8 @@  discard block
 block discarded – undo
244 243
      */
245 244
     public function remove($entity, $fields)
246 245
     {
247
-        return array_values(array_filter($this->{$entity}, function ($field) use ($fields) {
248
-            return ! in_array($field['name'], (array) $fields);
246
+        return array_values(array_filter($this->{$entity}, function($field) use ($fields) {
247
+            return !in_array($field['name'], (array) $fields);
249 248
         }));
250 249
     }
251 250
 
@@ -290,7 +289,7 @@  discard block
 block discarded – undo
290 289
     {
291 290
         $columns = $this->getColumns();
292 291
 
293
-        return collect($columns)->pluck('entity')->reject(function ($value, $key) {
292
+        return collect($columns)->pluck('entity')->reject(function($value, $key) {
294 293
             return $value == null;
295 294
         })->toArray();
296 295
     }
Please login to merge, or discard this patch.