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 | $all_fields = $this->getCurrentFields(); |
116 | 116 | |
117 | - $fields_without_a_tab = collect($all_fields)->filter(function ($value, $key) { |
|
117 | + $fields_without_a_tab = collect($all_fields)->filter(function($value, $key) { |
|
118 | 118 | return !isset($value['tab']); |
119 | 119 | }); |
120 | 120 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | if ($this->tabExists($label)) { |
132 | 132 | $all_fields = $this->getCurrentFields(); |
133 | 133 | |
134 | - $fields_for_current_tab = collect($all_fields)->filter(function ($value, $key) use ($label) { |
|
134 | + $fields_for_current_tab = collect($all_fields)->filter(function($value, $key) use ($label) { |
|
135 | 135 | return isset($value['tab']) && $value['tab'] == $label; |
136 | 136 | }); |
137 | 137 | |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | $fields = $this->getCurrentFields(); |
151 | 151 | |
152 | 152 | $fields_with_tabs = collect($fields) |
153 | - ->filter(function ($value, $key) { |
|
153 | + ->filter(function($value, $key) { |
|
154 | 154 | return isset($value['tab']); |
155 | 155 | }) |
156 | - ->each(function ($value, $key) use (&$tabs) { |
|
156 | + ->each(function($value, $key) use (&$tabs) { |
|
157 | 157 | if (!in_array($value['tab'], $tabs)) { |
158 | 158 | $tabs[] = $value['tab']; |
159 | 159 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function afterField($targetFieldName) |
91 | 91 | { |
92 | - $this->transformFields(function ($fields) use ($targetFieldName) { |
|
92 | + $this->transformFields(function($fields) use ($targetFieldName) { |
|
93 | 93 | return $this->moveField($fields, $targetFieldName, false); |
94 | 94 | }); |
95 | 95 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function beforeField($targetFieldName) |
104 | 104 | { |
105 | - $this->transformFields(function ($fields) use ($targetFieldName) { |
|
105 | + $this->transformFields(function($fields) use ($targetFieldName) { |
|
106 | 106 | return $this->moveField($fields, $targetFieldName, true); |
107 | 107 | }); |
108 | 108 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function removeField($name) |
147 | 147 | { |
148 | - $this->transformFields(function ($fields) use ($name) { |
|
148 | + $this->transformFields(function($fields) use ($name) { |
|
149 | 149 | array_forget($fields, $name); |
150 | 150 | |
151 | 151 | return $fields; |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | */ |
276 | 276 | public function orderFields($order) |
277 | 277 | { |
278 | - $this->transformFields(function ($fields) use ($order) { |
|
278 | + $this->transformFields(function($fields) use ($order) { |
|
279 | 279 | return $this->applyOrderToFields($fields, $order); |
280 | 280 | }); |
281 | 281 | } |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | public function hasUploadFields() |
339 | 339 | { |
340 | 340 | $fields = $this->getFields(); |
341 | - $upload_fields = array_where($fields, function ($value, $key) { |
|
341 | + $upload_fields = array_where($fields, function($value, $key) { |
|
342 | 342 | return isset($value['upload']) && $value['upload'] == true; |
343 | 343 | }); |
344 | 344 |
@@ -216,7 +216,7 @@ |
||
216 | 216 | |
217 | 217 | public function removeFilter($name) |
218 | 218 | { |
219 | - $strippedFiltersCollection = $this->filters()->reject(function ($filter) use ($name) { |
|
219 | + $strippedFiltersCollection = $this->filters()->reject(function($filter) use ($name) { |
|
220 | 220 | return $filter->name == $name; |
221 | 221 | }); |
222 | 222 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function applySearchTerm($searchTerm) |
24 | 24 | { |
25 | - return $this->query->where(function ($query) use ($searchTerm) { |
|
25 | + return $this->query->where(function($query) use ($searchTerm) { |
|
26 | 26 | foreach ($this->columns() as $column) { |
27 | 27 | if (!isset($column['type'])) { |
28 | 28 | abort(400, 'Missing column type when trying to apply search term.'); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | case 'select': |
84 | 84 | case 'select_multiple': |
85 | - $query->orWhereHas($column['entity'], function ($q) use ($column, $searchTerm) { |
|
85 | + $query->orWhereHas($column['entity'], function($q) use ($column, $searchTerm) { |
|
86 | 86 | $q->where($column['attribute'], 'like', '%'.$searchTerm.'%'); |
87 | 87 | }); |
88 | 88 | break; |
@@ -86,7 +86,7 @@ |
||
86 | 86 | { |
87 | 87 | if (isset($field['entity'])) { |
88 | 88 | $relationArray = explode('.', $field['entity']); |
89 | - $relatedModel = array_reduce(array_splice($relationArray, 0, -1), function ($obj, $method) { |
|
89 | + $relatedModel = array_reduce(array_splice($relationArray, 0, -1), function($obj, $method) { |
|
90 | 90 | return $obj->{$method} ? $obj->{$method} : $obj; |
91 | 91 | }, $model); |
92 | 92 |
@@ -187,8 +187,7 @@ discard block |
||
187 | 187 | $columnsArray = $this->columns(); |
188 | 188 | |
189 | 189 | if (array_key_exists($targetColumnName, $columnsArray)) { |
190 | - $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : |
|
191 | - array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
190 | + $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
192 | 191 | |
193 | 192 | $element = array_pop($columnsArray); |
194 | 193 | $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true); |
@@ -334,7 +333,7 @@ discard block |
||
334 | 333 | { |
335 | 334 | $columns = $this->columns(); |
336 | 335 | |
337 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
336 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
338 | 337 | return $value == null; |
339 | 338 | })->toArray(); |
340 | 339 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | { |
82 | 82 | $all_relation_fields = $this->getRelationFields(); |
83 | 83 | |
84 | - return array_where($all_relation_fields, function ($value, $key) { |
|
84 | + return array_where($all_relation_fields, function($value, $key) { |
|
85 | 85 | return isset($value['pivot']) && $value['pivot']; |
86 | 86 | }); |
87 | 87 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $this->getDbColumnTypes(); |
18 | 18 | } |
19 | 19 | |
20 | - array_map(function ($field) { |
|
20 | + array_map(function($field) { |
|
21 | 21 | $new_field = [ |
22 | 22 | 'name' => $field, |
23 | 23 | 'label' => $this->makeLabel($field), |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | */ |
245 | 245 | public function getFirstOfItsTypeInArray($type, $array) |
246 | 246 | { |
247 | - return array_first($array, function ($item) use ($type) { |
|
247 | + return array_first($array, function($item) use ($type) { |
|
248 | 248 | return $item['type'] == $type; |
249 | 249 | }); |
250 | 250 | } |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | public function sync($type, $fields, $attributes) |
263 | 263 | { |
264 | 264 | if (!empty($this->{$type})) { |
265 | - $this->{$type} = array_map(function ($field) use ($fields, $attributes) { |
|
265 | + $this->{$type} = array_map(function($field) use ($fields, $attributes) { |
|
266 | 266 | if (in_array($field['name'], (array) $fields)) { |
267 | 267 | $field = array_merge($field, $attributes); |
268 | 268 | } |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $model = $this->model; |
302 | 302 | } |
303 | 303 | |
304 | - $result = array_reduce(array_splice($relationArray, 0, $length), function ($obj, $method) { |
|
304 | + $result = array_reduce(array_splice($relationArray, 0, $length), function($obj, $method) { |
|
305 | 305 | return $obj->$method()->getRelated(); |
306 | 306 | }, $model); |
307 | 307 |