We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -79,7 +79,6 @@ |
||
79 | 79 | * If a column array is missing the "label" attribute, an ugly error would be show. |
80 | 80 | * So we add the field Name as a label - it's better than nothing. |
81 | 81 | * |
82 | - * @param array $array Column definition array. |
|
83 | 82 | * @return array Proper array defining the column. |
84 | 83 | */ |
85 | 84 | protected function makeSureColumnHasLabel($column) |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | // make sure the column has a priority in terms of visibility |
49 | 49 | // if no priority has been defined, use the order in the array plus one |
50 | - if (! array_key_exists('priority', $column)) { |
|
50 | + if (!array_key_exists('priority', $column)) { |
|
51 | 51 | $position_in_columns_array = (int) array_search($column['key'], array_keys($this->columns())); |
52 | 52 | $allColumns[$column['key']]['priority'] = $position_in_columns_array + 1; |
53 | 53 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $column = ['name' => $column]; |
69 | 69 | } |
70 | 70 | |
71 | - if (is_array($column) && ! isset($column['name'])) { |
|
71 | + if (is_array($column) && !isset($column['name'])) { |
|
72 | 72 | $column['name'] = 'anonymous_column_'.str_random(5); |
73 | 73 | } |
74 | 74 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | protected function makeSureColumnHasLabel($column) |
86 | 86 | { |
87 | - if (! isset($column['label'])) { |
|
87 | + if (!isset($column['label'])) { |
|
88 | 88 | $column['label'] = mb_ucfirst($this->makeLabel($column['name'])); |
89 | 89 | } |
90 | 90 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | protected function makeSureColumnHasType($column) |
101 | 101 | { |
102 | - if (! isset($column['type'])) { |
|
102 | + if (!isset($column['type'])) { |
|
103 | 103 | $column['type'] = 'text'; |
104 | 104 | } |
105 | 105 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | protected function makeSureColumnHasKey($column) |
118 | 118 | { |
119 | - if (! isset($column['key'])) { |
|
119 | + if (!isset($column['key'])) { |
|
120 | 120 | $column['key'] = str_replace('.', '__', $column['name']); |
121 | 121 | } |
122 | 122 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | // if this is a relation type field and no corresponding model was specified, |
136 | 136 | // get it from the relation method defined in the main model |
137 | - if (isset($column['entity']) && ! isset($column['model'])) { |
|
137 | + if (isset($column['entity']) && !isset($column['model'])) { |
|
138 | 138 | $column['model'] = $this->getRelationModel($column['entity']); |
139 | 139 | } |
140 | 140 | |
@@ -155,8 +155,7 @@ discard block |
||
155 | 155 | $columnsArray = $this->columns(); |
156 | 156 | |
157 | 157 | if (array_key_exists($targetColumnName, $columnsArray)) { |
158 | - $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : |
|
159 | - array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
158 | + $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
160 | 159 | |
161 | 160 | $element = array_pop($columnsArray); |
162 | 161 | $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function makeFirstColumn() |
114 | 114 | { |
115 | - if (! $this->columns()) { |
|
115 | + if (!$this->columns()) { |
|
116 | 116 | return false; |
117 | 117 | } |
118 | 118 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function removeColumns($columns) |
159 | 159 | { |
160 | - if (! empty($columns)) { |
|
160 | + if (!empty($columns)) { |
|
161 | 161 | foreach ($columns as $columnKey) { |
162 | 162 | $this->removeColumn($columnKey); |
163 | 163 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | { |
237 | 237 | $columns = $this->columns(); |
238 | 238 | |
239 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
239 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
240 | 240 | return $value == null; |
241 | 241 | })->toArray(); |
242 | 242 | } |