We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | /** |
75 | 75 | * Add a column at the end of the CRUD object's "columns" array and return it |
76 | 76 | */ |
77 | - public function addAndReturnColumn(array|string $column): CrudColumn |
|
77 | + public function addAndReturnColumn(array | string $column): CrudColumn |
|
78 | 78 | { |
79 | 79 | $column = $this->prepareAttributesAndAddColumn($column); |
80 | 80 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function makeFirstColumn() |
124 | 124 | { |
125 | - if (! $this->columns()) { |
|
125 | + if (!$this->columns()) { |
|
126 | 126 | return false; |
127 | 127 | } |
128 | 128 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function removeColumns($columns) |
168 | 168 | { |
169 | - if (! empty($columns)) { |
|
169 | + if (!empty($columns)) { |
|
170 | 170 | foreach ($columns as $columnKey) { |
171 | 171 | $this->removeColumn($columnKey); |
172 | 172 | } |
@@ -260,8 +260,8 @@ discard block |
||
260 | 260 | { |
261 | 261 | $columns = $this->columns(); |
262 | 262 | |
263 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
264 | - return ! $value; |
|
263 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
264 | + return !$value; |
|
265 | 265 | })->toArray(); |
266 | 266 | } |
267 | 267 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | */ |
336 | 336 | public function hasColumnWhere($attribute, $value) |
337 | 337 | { |
338 | - $match = Arr::first($this->columns(), function ($column, $columnKey) use ($attribute, $value) { |
|
338 | + $match = Arr::first($this->columns(), function($column, $columnKey) use ($attribute, $value) { |
|
339 | 339 | return isset($column[$attribute]) && $column[$attribute] == $value; |
340 | 340 | }); |
341 | 341 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | */ |
352 | 352 | public function firstColumnWhere($attribute, $value) |
353 | 353 | { |
354 | - return Arr::first($this->columns(), function ($column, $columnKey) use ($attribute, $value) { |
|
354 | + return Arr::first($this->columns(), function($column, $columnKey) use ($attribute, $value) { |
|
355 | 355 | return isset($column[$attribute]) && $column[$attribute] == $value; |
356 | 356 | }); |
357 | 357 | } |
@@ -400,8 +400,8 @@ discard block |
||
400 | 400 | */ |
401 | 401 | public function countColumnsWithoutActions() |
402 | 402 | { |
403 | - return collect($this->columns())->filter(function ($column, $key) { |
|
404 | - return ! isset($column['hasActions']) || $column['hasActions'] == false; |
|
403 | + return collect($this->columns())->filter(function($column, $key) { |
|
404 | + return !isset($column['hasActions']) || $column['hasActions'] == false; |
|
405 | 405 | })->count(); |
406 | 406 | } |
407 | 407 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $column = ['name' => $column]; |
51 | 51 | } |
52 | 52 | |
53 | - if (is_array($column) && ! isset($column['name'])) { |
|
53 | + if (is_array($column) && !isset($column['name'])) { |
|
54 | 54 | $column['name'] = 'anonymous_column_'.Str::random(5); |
55 | 55 | } |
56 | 56 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | protected function makeSureColumnHasLabel($column) |
68 | 68 | { |
69 | - if (! isset($column['label'])) { |
|
69 | + if (!isset($column['label'])) { |
|
70 | 70 | $column['label'] = mb_ucfirst($this->makeLabel($column['name'])); |
71 | 71 | } |
72 | 72 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | protected function makeSureColumnHasKey($column) |
153 | 153 | { |
154 | - if (! isset($column['key'])) { |
|
154 | + if (!isset($column['key'])) { |
|
155 | 155 | $column['key'] = str_replace('.', '__', $column['name']); |
156 | 156 | } |
157 | 157 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | */ |
170 | 170 | protected function makeSureColumnHasWrapper($column) |
171 | 171 | { |
172 | - if (! isset($column['wrapper'])) { |
|
172 | + if (!isset($column['wrapper'])) { |
|
173 | 173 | $column['wrapper'] = []; |
174 | 174 | } |
175 | 175 | |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | { |
255 | 255 | // if this is a relation type field and no corresponding model was specified, |
256 | 256 | // get it from the relation method defined in the main model |
257 | - if (isset($column['entity']) && $column['entity'] !== false && ! isset($column['model'])) { |
|
257 | + if (isset($column['entity']) && $column['entity'] !== false && !isset($column['model'])) { |
|
258 | 258 | $column['model'] = $this->getRelationModel($column['entity']); |
259 | 259 | } |
260 | 260 | |
@@ -291,8 +291,7 @@ discard block |
||
291 | 291 | $columnsArray = $this->columns(); |
292 | 292 | |
293 | 293 | if (array_key_exists($targetColumnName, $columnsArray)) { |
294 | - $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : |
|
295 | - array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
294 | + $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
296 | 295 | |
297 | 296 | $element = array_pop($columnsArray); |
298 | 297 | $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true); |
@@ -314,7 +313,7 @@ discard block |
||
314 | 313 | { |
315 | 314 | static $cache = []; |
316 | 315 | |
317 | - if (! $this->driverIsSql()) { |
|
316 | + if (!$this->driverIsSql()) { |
|
318 | 317 | return true; |
319 | 318 | } |
320 | 319 | |
@@ -330,7 +329,7 @@ discard block |
||
330 | 329 | /** |
331 | 330 | * Prepare the column attributes and add it to operation settings |
332 | 331 | */ |
333 | - private function prepareAttributesAndAddColumn(array|string $column): CrudColumn |
|
332 | + private function prepareAttributesAndAddColumn(array | string $column): CrudColumn |
|
334 | 333 | { |
335 | 334 | $column = $this->makeSureColumnHasNeededAttributes($column); |
336 | 335 | $this->addColumnToOperationSettings($column); |