We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | public function addField($field, $form = 'both') |
| 20 | 20 | { |
| 21 | - if (! empty($field['form'])) { |
|
| 21 | + if (!empty($field['form'])) { |
|
| 22 | 22 | $form = $field['form']; |
| 23 | 23 | } |
| 24 | 24 | // if the field_definition_array array is a string, it means the programmer was lazy and has only passed the name |
@@ -31,28 +31,28 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | // if this is a relation type field and no corresponding model was specified, get it from the relation method |
| 33 | 33 | // defined in the main model |
| 34 | - if (isset($completeFieldsArray['entity']) && ! isset($completeFieldsArray['model'])) { |
|
| 34 | + if (isset($completeFieldsArray['entity']) && !isset($completeFieldsArray['model'])) { |
|
| 35 | 35 | $completeFieldsArray['model'] = $this->getRelationModel($completeFieldsArray['entity']); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // if the label is missing, we should set it |
| 39 | - if (! isset($completeFieldsArray['label'])) { |
|
| 39 | + if (!isset($completeFieldsArray['label'])) { |
|
| 40 | 40 | $completeFieldsArray['label'] = mb_ucfirst(str_replace('_', ' ', $completeFieldsArray['name'])); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | // if the field type is missing, we should set it |
| 44 | - if (! isset($completeFieldsArray['type'])) { |
|
| 44 | + if (!isset($completeFieldsArray['type'])) { |
|
| 45 | 45 | $completeFieldsArray['type'] = $this->getFieldTypeFromDbColumnType($completeFieldsArray['name']); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // if a tab was mentioned, we should enable it |
| 49 | 49 | if (isset($completeFieldsArray['tab'])) { |
| 50 | - if (! $this->tabsEnabled()) { |
|
| 50 | + if (!$this->tabsEnabled()) { |
|
| 51 | 51 | $this->enableTabs(); |
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - $this->transformFields($form, function ($fields) use ($completeFieldsArray) { |
|
| 55 | + $this->transformFields($form, function($fields) use ($completeFieldsArray) { |
|
| 56 | 56 | $fields[$completeFieldsArray['name']] = $completeFieldsArray; |
| 57 | 57 | |
| 58 | 58 | return $fields; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function afterField($targetFieldName, $form = 'both') |
| 86 | 86 | { |
| 87 | - $this->transformFields($form, function ($fields) use ($targetFieldName) { |
|
| 87 | + $this->transformFields($form, function($fields) use ($targetFieldName) { |
|
| 88 | 88 | return $this->moveField($fields, $targetFieldName, false); |
| 89 | 89 | }); |
| 90 | 90 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function beforeField($targetFieldName, $form = 'both') |
| 99 | 99 | { |
| 100 | - $this->transformFields($form, function ($fields) use ($targetFieldName) { |
|
| 100 | + $this->transformFields($form, function($fields) use ($targetFieldName) { |
|
| 101 | 101 | return $this->moveField($fields, $targetFieldName, true); |
| 102 | 102 | }); |
| 103 | 103 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function removeField($name, $form = 'both') |
| 142 | 142 | { |
| 143 | - $this->transformFields($form, function ($fields) use ($name) { |
|
| 143 | + $this->transformFields($form, function($fields) use ($name) { |
|
| 144 | 144 | array_forget($fields, $name); |
| 145 | 145 | |
| 146 | 146 | return $fields; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | public function removeFields($array_of_names, $form = 'both') |
| 157 | 157 | { |
| 158 | - if (! empty($array_of_names)) { |
|
| 158 | + if (!empty($array_of_names)) { |
|
| 159 | 159 | foreach ($array_of_names as $name) { |
| 160 | 160 | $this->removeField($name, $form); |
| 161 | 161 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | public function removeAllFields($form = 'both') |
| 171 | 171 | { |
| 172 | 172 | $current_fields = $this->getCurrentFields(); |
| 173 | - if (! empty($current_fields)) { |
|
| 173 | + if (!empty($current_fields)) { |
|
| 174 | 174 | foreach ($current_fields as $field) { |
| 175 | 175 | $this->removeField($field['name'], $form); |
| 176 | 176 | } |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | $jsonCastables = ['array', 'object', 'json']; |
| 261 | 261 | $fieldCasting = $casted_attributes[$field['name']]; |
| 262 | 262 | |
| 263 | - if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && ! empty($data[$field['name']]) && ! is_array($data[$field['name']])) { |
|
| 263 | + if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && !empty($data[$field['name']]) && !is_array($data[$field['name']])) { |
|
| 264 | 264 | try { |
| 265 | 265 | $data[$field['name']] = json_decode($data[$field['name']]); |
| 266 | 266 | } catch (\Exception $e) { |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | */ |
| 295 | 295 | public function orderFields($order, $form = 'both') |
| 296 | 296 | { |
| 297 | - $this->transformFields($form, function ($fields) use ($order) { |
|
| 297 | + $this->transformFields($form, function($fields) use ($order) { |
|
| 298 | 298 | return $this->applyOrderToFields($fields, $order); |
| 299 | 299 | }); |
| 300 | 300 | } |