We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function makeFirstColumn() |
116 | 116 | { |
117 | - if (! $this->columns()) { |
|
117 | + if (!$this->columns()) { |
|
118 | 118 | return false; |
119 | 119 | } |
120 | 120 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function removeColumns($columns) |
161 | 161 | { |
162 | - if (! empty($columns)) { |
|
162 | + if (!empty($columns)) { |
|
163 | 163 | foreach ($columns as $columnKey) { |
164 | 164 | $this->removeColumn($columnKey); |
165 | 165 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | { |
253 | 253 | $columns = $this->columns(); |
254 | 254 | |
255 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
255 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
256 | 256 | return $value == null; |
257 | 257 | })->toArray(); |
258 | 258 | } |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | */ |
330 | 330 | public function hasColumnWhere($attribute, $value) |
331 | 331 | { |
332 | - $match = Arr::first($this->columns(), function ($column, $columnKey) use ($attribute, $value) { |
|
332 | + $match = Arr::first($this->columns(), function($column, $columnKey) use ($attribute, $value) { |
|
333 | 333 | return isset($column[$attribute]) && $column[$attribute] == $value; |
334 | 334 | }); |
335 | 335 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | */ |
346 | 346 | public function firstColumnWhere($attribute, $value) |
347 | 347 | { |
348 | - return Arr::first($this->columns(), function ($column, $columnKey) use ($attribute, $value) { |
|
348 | + return Arr::first($this->columns(), function($column, $columnKey) use ($attribute, $value) { |
|
349 | 349 | return isset($column[$attribute]) && $column[$attribute] == $value; |
350 | 350 | }); |
351 | 351 | } |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | |
379 | 379 | // check if it's a method on the model, |
380 | 380 | // that means it's a relationship |
381 | - if (! $columnExistsInDb && method_exists($this->model, $column['name'])) { |
|
381 | + if (!$columnExistsInDb && method_exists($this->model, $column['name'])) { |
|
382 | 382 | $relatedModel = $this->model->{$column['name']}()->getRelated(); |
383 | 383 | $column['entity'] = $column['name']; |
384 | 384 | $column['model'] = get_class($relatedModel); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | // make sure the column has a priority in terms of visibility |
23 | 23 | // if no priority has been defined, use the order in the array plus one |
24 | - if (! array_key_exists('priority', $column)) { |
|
24 | + if (!array_key_exists('priority', $column)) { |
|
25 | 25 | $position_in_columns_array = (int) array_search($column['key'], array_keys($this->columns())); |
26 | 26 | $allColumns[$column['key']]['priority'] = $position_in_columns_array + 1; |
27 | 27 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $column = ['name' => $column]; |
43 | 43 | } |
44 | 44 | |
45 | - if (is_array($column) && ! isset($column['name'])) { |
|
45 | + if (is_array($column) && !isset($column['name'])) { |
|
46 | 46 | $column['name'] = 'anonymous_column_'.Str::random(5); |
47 | 47 | } |
48 | 48 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | protected function makeSureColumnHasLabel($column) |
60 | 60 | { |
61 | - if (! isset($column['label'])) { |
|
61 | + if (!isset($column['label'])) { |
|
62 | 62 | $column['label'] = mb_ucfirst($this->makeLabel($column['name'])); |
63 | 63 | } |
64 | 64 | |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | { |
76 | 76 | // if it's got a method on the model with the same name |
77 | 77 | // then it should be a relationship |
78 | - if (! isset($column['type']) && method_exists($this->model, $column['name'])) { |
|
78 | + if (!isset($column['type']) && method_exists($this->model, $column['name'])) { |
|
79 | 79 | $column['type'] = 'relationship'; |
80 | 80 | } |
81 | 81 | |
82 | - if (! isset($column['type'])) { |
|
82 | + if (!isset($column['type'])) { |
|
83 | 83 | $column['type'] = 'text'; |
84 | 84 | } |
85 | 85 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | protected function makeSureColumnHasKey($column) |
98 | 98 | { |
99 | - if (! isset($column['key'])) { |
|
99 | + if (!isset($column['key'])) { |
|
100 | 100 | $column['key'] = str_replace('.', '__', $column['name']); |
101 | 101 | } |
102 | 102 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | protected function makeSureColumnHasWrapper($column) |
116 | 116 | { |
117 | - if (! isset($column['wrapper'])) { |
|
117 | + if (!isset($column['wrapper'])) { |
|
118 | 118 | $column['wrapper'] = []; |
119 | 119 | } |
120 | 120 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | { |
133 | 133 | // if this is a relation type field and no corresponding model was specified, |
134 | 134 | // get it from the relation method defined in the main model |
135 | - if (isset($column['entity']) && ! isset($column['model'])) { |
|
135 | + if (isset($column['entity']) && !isset($column['model'])) { |
|
136 | 136 | $column['model'] = $this->getRelationModel($column['entity']); |
137 | 137 | } |
138 | 138 | |
@@ -153,8 +153,7 @@ discard block |
||
153 | 153 | $columnsArray = $this->columns(); |
154 | 154 | |
155 | 155 | if (array_key_exists($targetColumnName, $columnsArray)) { |
156 | - $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : |
|
157 | - array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
156 | + $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
158 | 157 | |
159 | 158 | $element = array_pop($columnsArray); |
160 | 159 | $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true); |