We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | return ['name' => $field]; |
116 | 116 | } |
117 | 117 | |
118 | - if (is_array($field) && ! isset($field['name'])) { |
|
118 | + if (is_array($field) && !isset($field['name'])) { |
|
119 | 119 | abort(500, 'All fields must have their name defined'); |
120 | 120 | } |
121 | 121 | |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | } |
188 | 188 | // if there's a model defined, but no attribute |
189 | 189 | // guess an attribute using the identifiableAttribute functionality in CrudTrait |
190 | - if (isset($field['model']) && ! isset($field['attribute']) && method_exists($field['model'], 'identifiableAttribute')) { |
|
190 | + if (isset($field['model']) && !isset($field['attribute']) && method_exists($field['model'], 'identifiableAttribute')) { |
|
191 | 191 | $field['attribute'] = (new $field['model']())->identifiableAttribute(); |
192 | 192 | } |
193 | 193 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | */ |
204 | 204 | protected function makeSureFieldHasLabel($field) |
205 | 205 | { |
206 | - if (! isset($field['label'])) { |
|
206 | + if (!isset($field['label'])) { |
|
207 | 207 | $name = str_replace(',', ' ', $field['name']); |
208 | 208 | $name = str_replace('_id', '', $name); |
209 | 209 | $field['label'] = mb_ucfirst(str_replace('_', ' ', $name)); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | protected function makeSureFieldHasType($field) |
223 | 223 | { |
224 | - if (! isset($field['type'])) { |
|
224 | + if (!isset($field['type'])) { |
|
225 | 225 | $field['type'] = isset($field['relation_type']) ? $this->inferFieldTypeFromRelationType($field['relation_type']) : $this->inferFieldTypeFromDbColumnType($field['name']); |
226 | 226 | } |
227 | 227 | |
@@ -254,16 +254,16 @@ discard block |
||
254 | 254 | */ |
255 | 255 | protected function makeSureSubfieldsHaveNecessaryAttributes($field) |
256 | 256 | { |
257 | - if (! isset($field['subfields']) || ! is_array($field['subfields'])) { |
|
257 | + if (!isset($field['subfields']) || !is_array($field['subfields'])) { |
|
258 | 258 | return $field; |
259 | 259 | } |
260 | 260 | |
261 | - if(! is_multidimensional_array($field['subfields'])) { |
|
261 | + if (!is_multidimensional_array($field['subfields'])) { |
|
262 | 262 | $field['subfields'] = [$field['subfields']]; |
263 | 263 | } |
264 | 264 | |
265 | 265 | foreach ($field['subfields'] as $key => $subfield) { |
266 | - if (empty($subfield) || ! isset($subfield['name'])) { |
|
266 | + if (empty($subfield) || !isset($subfield['name'])) { |
|
267 | 267 | abort(500, 'Subfield name can\'t be empty'); |
268 | 268 | } |
269 | 269 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | |
275 | 275 | $subfield['parentFieldName'] = $field['name']; |
276 | 276 | |
277 | - if (! isset($field['model'])) { |
|
277 | + if (!isset($field['model'])) { |
|
278 | 278 | // we're inside a simple 'repeatable' with no model/relationship, so |
279 | 279 | // we assume all subfields are supposed to be text fields |
280 | 280 | $subfield['type'] = $subfield['type'] ?? 'text'; |
@@ -301,11 +301,11 @@ discard block |
||
301 | 301 | case 'BelongsToMany': |
302 | 302 | $pivotSelectorField = static::getPivotFieldStructure($field); |
303 | 303 | |
304 | - $pivot = Arr::where($field['subfields'], function ($item) use ($pivotSelectorField) { |
|
304 | + $pivot = Arr::where($field['subfields'], function($item) use ($pivotSelectorField) { |
|
305 | 305 | return $item['name'] === $pivotSelectorField['name']; |
306 | 306 | }); |
307 | 307 | |
308 | - if (! empty($pivot)) { |
|
308 | + if (!empty($pivot)) { |
|
309 | 309 | break; |
310 | 310 | } |
311 | 311 | |
@@ -318,11 +318,11 @@ discard block |
||
318 | 318 | $entity = isset($field['baseEntity']) ? $field['baseEntity'].'.'.$field['entity'] : $field['entity']; |
319 | 319 | $relationInstance = $this->getRelationInstance(['entity' => $entity]); |
320 | 320 | |
321 | - $localKeyField = Arr::where($field['subfields'], function ($item) use ($relationInstance) { |
|
321 | + $localKeyField = Arr::where($field['subfields'], function($item) use ($relationInstance) { |
|
322 | 322 | return $item['name'] === $relationInstance->getRelated()->getKeyName(); |
323 | 323 | }); |
324 | 324 | |
325 | - if (! empty($localKeyField)) { |
|
325 | + if (!empty($localKeyField)) { |
|
326 | 326 | break; |
327 | 327 | } |
328 | 328 | |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | { |
348 | 348 | // if a tab was mentioned, we should enable it |
349 | 349 | if (isset($field['tab'])) { |
350 | - if (! $this->tabsEnabled()) { |
|
350 | + if (!$this->tabsEnabled()) { |
|
351 | 351 | $this->enableTabs(); |
352 | 352 | } |
353 | 353 | } |