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,8 +252,8 @@ discard block |
||
| 252 | 252 | { |
| 253 | 253 | $columns = $this->columns(); |
| 254 | 254 | |
| 255 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
| 256 | - return ! $value; |
|
| 255 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
| 256 | + return !$value; |
|
| 257 | 257 | })->toArray(); |
| 258 | 258 | } |
| 259 | 259 | |
@@ -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 | } |
@@ -379,9 +379,9 @@ discard block |
||
| 379 | 379 | |
| 380 | 380 | // check if method exists in model so it's a possible relation |
| 381 | 381 | // but exclude possible matches if developer setup entity => false |
| 382 | - $could_be_relation = method_exists($this->model, $column['name']) ? ! isset($column['entity']) || $column['entity'] !== false : isset($column['entity']) || $column['entity'] !== false; |
|
| 382 | + $could_be_relation = method_exists($this->model, $column['name']) ? !isset($column['entity']) || $column['entity'] !== false : isset($column['entity']) || $column['entity'] !== false; |
|
| 383 | 383 | |
| 384 | - if (! $column_exists_in_db && $could_be_relation) { |
|
| 384 | + if (!$column_exists_in_db && $could_be_relation) { |
|
| 385 | 385 | $related_model = $this->model->{$column['name']}()->getRelated(); |
| 386 | 386 | $column['entity'] = $column['name']; |
| 387 | 387 | $column['model'] = get_class($related_model); |
@@ -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 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $column = ['name' => $column]; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - if (is_array($column) && ! isset($column['name'])) { |
|
| 52 | + if (is_array($column) && !isset($column['name'])) { |
|
| 53 | 53 | $column['name'] = 'anonymous_column_'.Str::random(5); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | protected function makeSureColumnHasLabel($column) |
| 67 | 67 | { |
| 68 | - if (! isset($column['label'])) { |
|
| 68 | + if (!isset($column['label'])) { |
|
| 69 | 69 | $column['label'] = mb_ucfirst($this->makeLabel($column['name'])); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -83,13 +83,13 @@ discard block |
||
| 83 | 83 | // check if method exists in model so it's a possible relation |
| 84 | 84 | // but exclude possible matches if developer setup entity => false |
| 85 | 85 | |
| 86 | - $could_be_relation = method_exists($this->model, $column['name']) ? ! isset($column['entity']) || $column['entity'] !== false : isset($column['entity']) || $column['entity'] !== false; |
|
| 86 | + $could_be_relation = method_exists($this->model, $column['name']) ? !isset($column['entity']) || $column['entity'] !== false : isset($column['entity']) || $column['entity'] !== false; |
|
| 87 | 87 | |
| 88 | - if (! isset($column['type']) && $could_be_relation) { |
|
| 88 | + if (!isset($column['type']) && $could_be_relation) { |
|
| 89 | 89 | $column['type'] = 'relationship'; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if (! isset($column['type'])) { |
|
| 92 | + if (!isset($column['type'])) { |
|
| 93 | 93 | $column['type'] = 'text'; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | protected function makeSureColumnHasKey($column) |
| 108 | 108 | { |
| 109 | - if (! isset($column['key'])) { |
|
| 109 | + if (!isset($column['key'])) { |
|
| 110 | 110 | $column['key'] = str_replace('.', '__', $column['name']); |
| 111 | 111 | } |
| 112 | 112 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | protected function makeSureColumnHasWrapper($column) |
| 126 | 126 | { |
| 127 | - if (! isset($column['wrapper'])) { |
|
| 127 | + if (!isset($column['wrapper'])) { |
|
| 128 | 128 | $column['wrapper'] = []; |
| 129 | 129 | } |
| 130 | 130 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | { |
| 143 | 143 | // if this is a relation type field and no corresponding model was specified, |
| 144 | 144 | // get it from the relation method defined in the main model |
| 145 | - if (isset($column['entity']) && ! isset($column['model'])) { |
|
| 145 | + if (isset($column['entity']) && !isset($column['model'])) { |
|
| 146 | 146 | $column['model'] = $this->getRelationModel($column['entity']); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -163,8 +163,7 @@ discard block |
||
| 163 | 163 | $columnsArray = $this->columns(); |
| 164 | 164 | |
| 165 | 165 | if (array_key_exists($targetColumnName, $columnsArray)) { |
| 166 | - $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : |
|
| 167 | - array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
| 166 | + $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
| 168 | 167 | |
| 169 | 168 | $element = array_pop($columnsArray); |
| 170 | 169 | $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true); |
@@ -187,7 +186,7 @@ discard block |
||
| 187 | 186 | { |
| 188 | 187 | static $cache = []; |
| 189 | 188 | |
| 190 | - if (! $this->driverIsSql()) { |
|
| 189 | + if (!$this->driverIsSql()) { |
|
| 191 | 190 | return true; |
| 192 | 191 | } |
| 193 | 192 | |