We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -396,7 +396,7 @@ |
||
396 | 396 | * Get a namespaced version of the field type name. |
397 | 397 | * Appends the 'view_namespace' attribute of the field to the `type', using dot notation. |
398 | 398 | * |
399 | - * @param array $field Field array |
|
399 | + * @param string $field Field array |
|
400 | 400 | * @return string Namespaced version of the field type name. Ex: 'text', 'custom.view.path.text' |
401 | 401 | */ |
402 | 402 | public function getFieldTypeWithNamespace($field) |
@@ -28,28 +28,28 @@ discard block |
||
28 | 28 | |
29 | 29 | // if this is a relation type field and no corresponding model was specified, get it from the relation method |
30 | 30 | // defined in the main model |
31 | - if (isset($completeFieldsArray['entity']) && ! isset($completeFieldsArray['model'])) { |
|
31 | + if (isset($completeFieldsArray['entity']) && !isset($completeFieldsArray['model'])) { |
|
32 | 32 | $completeFieldsArray['model'] = $this->getRelationModel($completeFieldsArray['entity']); |
33 | 33 | } |
34 | 34 | |
35 | 35 | // if the label is missing, we should set it |
36 | - if (! isset($completeFieldsArray['label'])) { |
|
36 | + if (!isset($completeFieldsArray['label'])) { |
|
37 | 37 | $completeFieldsArray['label'] = mb_ucfirst(str_replace('_', ' ', $completeFieldsArray['name'])); |
38 | 38 | } |
39 | 39 | |
40 | 40 | // if the field type is missing, we should set it |
41 | - if (! isset($completeFieldsArray['type'])) { |
|
41 | + if (!isset($completeFieldsArray['type'])) { |
|
42 | 42 | $completeFieldsArray['type'] = $this->getFieldTypeFromDbColumnType($completeFieldsArray['name']); |
43 | 43 | } |
44 | 44 | |
45 | 45 | // if a tab was mentioned, we should enable it |
46 | 46 | if (isset($completeFieldsArray['tab'])) { |
47 | - if (! $this->tabsEnabled()) { |
|
47 | + if (!$this->tabsEnabled()) { |
|
48 | 48 | $this->enableTabs(); |
49 | 49 | } |
50 | 50 | } |
51 | 51 | |
52 | - $this->transformFields($form, function ($fields) use ($completeFieldsArray) { |
|
52 | + $this->transformFields($form, function($fields) use ($completeFieldsArray) { |
|
53 | 53 | $fields[$completeFieldsArray['name']] = $completeFieldsArray; |
54 | 54 | |
55 | 55 | return $fields; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function afterField($targetFieldName, $form = 'both') |
83 | 83 | { |
84 | - $this->transformFields($form, function ($fields) use ($targetFieldName) { |
|
84 | + $this->transformFields($form, function($fields) use ($targetFieldName) { |
|
85 | 85 | return $this->moveField($fields, $targetFieldName, false); |
86 | 86 | }); |
87 | 87 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function beforeField($targetFieldName, $form = 'both') |
96 | 96 | { |
97 | - $this->transformFields($form, function ($fields) use ($targetFieldName) { |
|
97 | + $this->transformFields($form, function($fields) use ($targetFieldName) { |
|
98 | 98 | return $this->moveField($fields, $targetFieldName, true); |
99 | 99 | }); |
100 | 100 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function removeField($name, $form = 'both') |
139 | 139 | { |
140 | - $this->transformFields($form, function ($fields) use ($name) { |
|
140 | + $this->transformFields($form, function($fields) use ($name) { |
|
141 | 141 | array_forget($fields, $name); |
142 | 142 | |
143 | 143 | return $fields; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function removeFields($array_of_names, $form = 'both') |
154 | 154 | { |
155 | - if (! empty($array_of_names)) { |
|
155 | + if (!empty($array_of_names)) { |
|
156 | 156 | foreach ($array_of_names as $name) { |
157 | 157 | $this->removeField($name, $form); |
158 | 158 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | public function removeAllFields($form = 'both') |
168 | 168 | { |
169 | 169 | $current_fields = $this->getCurrentFields(); |
170 | - if (! empty($current_fields)) { |
|
170 | + if (!empty($current_fields)) { |
|
171 | 171 | foreach ($current_fields as $field) { |
172 | 172 | $this->removeField($field['name'], $form); |
173 | 173 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $jsonCastables = ['array', 'object', 'json']; |
258 | 258 | $fieldCasting = $casted_attributes[$field['name']]; |
259 | 259 | |
260 | - if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && ! empty($data[$field['name']]) && ! is_array($data[$field['name']])) { |
|
260 | + if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && !empty($data[$field['name']]) && !is_array($data[$field['name']])) { |
|
261 | 261 | try { |
262 | 262 | $data[$field['name']] = json_decode($data[$field['name']]); |
263 | 263 | } catch (\Exception $e) { |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | */ |
292 | 292 | public function orderFields($order, $form = 'both') |
293 | 293 | { |
294 | - $this->transformFields($form, function ($fields) use ($order) { |
|
294 | + $this->transformFields($form, function($fields) use ($order) { |
|
295 | 295 | return $this->applyOrderToFields($fields, $order); |
296 | 296 | }); |
297 | 297 | } |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | $alreadyLoaded = $this->loadedFieldTypes; |
420 | 420 | $type = $this->getFieldTypeWithNamespace($field); |
421 | 421 | |
422 | - if (! in_array($type, $this->getLoadedFieldTypes(), true)) { |
|
422 | + if (!in_array($type, $this->getLoadedFieldTypes(), true)) { |
|
423 | 423 | $alreadyLoaded[] = $type; |
424 | 424 | $this->loadedFieldTypes = $alreadyLoaded; |
425 | 425 | |
@@ -460,6 +460,6 @@ discard block |
||
460 | 460 | */ |
461 | 461 | public function fieldTypeNotLoaded($field) |
462 | 462 | { |
463 | - return ! in_array($this->getFieldTypeWithNamespace($field), $this->getLoadedFieldTypes()); |
|
463 | + return !in_array($this->getFieldTypeWithNamespace($field), $this->getLoadedFieldTypes()); |
|
464 | 464 | } |
465 | 465 | } |