We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function overwriteFieldNameFromDotNotationToArray($field) |
| 71 | 71 | { |
| 72 | - if (! is_array($field['name']) && strpos($field['name'], '.') !== false) { |
|
| 72 | + if (!is_array($field['name']) && strpos($field['name'], '.') !== false) { |
|
| 73 | 73 | $entity_array = explode('.', $field['name']); |
| 74 | 74 | $name_string = ''; |
| 75 | 75 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | return ['name' => $field]; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - if (is_array($field) && ! isset($field['name'])) { |
|
| 99 | + if (is_array($field) && !isset($field['name'])) { |
|
| 100 | 100 | abort(500, 'All fields must have their name defined'); |
| 101 | 101 | } |
| 102 | 102 | |
@@ -154,13 +154,13 @@ discard block |
||
| 154 | 154 | protected function makeSureFieldHasRelationshipData($field) |
| 155 | 155 | { |
| 156 | 156 | // only do this if "entity" is defined on the field |
| 157 | - if (! isset($field['entity'])) { |
|
| 157 | + if (!isset($field['entity'])) { |
|
| 158 | 158 | return $field; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | $extraFieldAttributes = $this->inferFieldAttributesFromRelationship($field); |
| 162 | 162 | |
| 163 | - if (! empty($extraFieldAttributes)) { |
|
| 163 | + if (!empty($extraFieldAttributes)) { |
|
| 164 | 164 | $field = array_merge($field, $extraFieldAttributes); |
| 165 | 165 | } else { |
| 166 | 166 | abort(500, 'Unable to process relationship data: '.$field['name']); |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | protected function overwriteFieldNameFromEntity($field) |
| 173 | 173 | { |
| 174 | 174 | // if the entity doesn't have a dot, it means we don't need to overwrite the name |
| 175 | - if (! Str::contains($field['entity'], '.')) { |
|
| 175 | + if (!Str::contains($field['entity'], '.')) { |
|
| 176 | 176 | return $field; |
| 177 | 177 | } |
| 178 | 178 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | if (count(explode('.', $field['entity'])) == count(explode('.', $this->getOnlyRelationEntity($field)))) { |
| 185 | 185 | $field['name'] = implode('.', array_slice(explode('.', $field['entity']), 0, -1)); |
| 186 | 186 | $relation = $this->getRelationInstance($field); |
| 187 | - if (! empty($field['name'])) { |
|
| 187 | + if (!empty($field['name'])) { |
|
| 188 | 188 | $field['name'] .= '.'; |
| 189 | 189 | } |
| 190 | 190 | $field['name'] .= $relation->getForeignKeyName(); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | { |
| 198 | 198 | // if there's a model defined, but no attribute |
| 199 | 199 | // guess an attribute using the indentifiableAttribute functionality in CrudTrait |
| 200 | - if (isset($field['model']) && ! isset($field['attribute']) && method_exists($field['model'], 'identifiableAttribute')) { |
|
| 200 | + if (isset($field['model']) && !isset($field['attribute']) && method_exists($field['model'], 'identifiableAttribute')) { |
|
| 201 | 201 | $field['attribute'] = call_user_func([(new $field['model']), 'identifiableAttribute']); |
| 202 | 202 | } |
| 203 | 203 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | */ |
| 214 | 214 | protected function makeSureFieldHasLabel($field) |
| 215 | 215 | { |
| 216 | - if (! isset($field['label'])) { |
|
| 216 | + if (!isset($field['label'])) { |
|
| 217 | 217 | $name = is_array($field['name']) ? $field['name'][0] : $field['name']; |
| 218 | 218 | $name = str_replace('_id', '', $name); |
| 219 | 219 | $field['label'] = mb_ucfirst(str_replace('_', ' ', $name)); |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | */ |
| 232 | 232 | protected function makeSureFieldHasType($field) |
| 233 | 233 | { |
| 234 | - if (! isset($field['type'])) { |
|
| 234 | + if (!isset($field['type'])) { |
|
| 235 | 235 | $field['type'] = isset($field['relation_type']) ? $this->inferFieldTypeFromFieldRelation($field) : $this->inferFieldTypeFromDbColumnType($field['name']); |
| 236 | 236 | } |
| 237 | 237 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | { |
| 249 | 249 | // if a tab was mentioned, we should enable it |
| 250 | 250 | if (isset($field['tab'])) { |
| 251 | - if (! $this->tabsEnabled()) { |
|
| 251 | + if (!$this->tabsEnabled()) { |
|
| 252 | 252 | $this->enableTabs(); |
| 253 | 253 | } |
| 254 | 254 | } |