We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('account_details', function (Blueprint $table) { |
|
| 16 | + Schema::create('account_details', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->integer('user_id')->unsigned(); |
| 19 | 19 | $table->string('nickname'); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | $all_relation_fields = $this->getRelationFields(); |
| 90 | 90 | |
| 91 | - return Arr::where($all_relation_fields, function ($value, $key) { |
|
| 91 | + return Arr::where($all_relation_fields, function($value, $key) { |
|
| 92 | 92 | return isset($value['pivot']) && $value['pivot']; |
| 93 | 93 | }); |
| 94 | 94 | } |
@@ -167,11 +167,11 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | private function createRelationsForItem($item, $formattedData) |
| 169 | 169 | { |
| 170 | - if (! isset($formattedData['relations'])) { |
|
| 170 | + if (!isset($formattedData['relations'])) { |
|
| 171 | 171 | return false; |
| 172 | 172 | } |
| 173 | 173 | foreach ($formattedData['relations'] as $relationMethod => $relationData) { |
| 174 | - if (! isset($relationData['model'])) { |
|
| 174 | + if (!isset($relationData['model'])) { |
|
| 175 | 175 | continue; |
| 176 | 176 | } |
| 177 | 177 | |
@@ -179,14 +179,14 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | if ($relation instanceof HasOne) { |
| 181 | 181 | if (isset($relationData['relations'])) { |
| 182 | - $belongsToRelations = Arr::where($relationData['relations'], function ($relation_data) { |
|
| 182 | + $belongsToRelations = Arr::where($relationData['relations'], function($relation_data) { |
|
| 183 | 183 | return $relation_data['relation_type'] == 'BelongsTo'; |
| 184 | 184 | }); |
| 185 | 185 | // adds the values of the BelongsTo relations of this entity to the array of values that will |
| 186 | 186 | // be saved at the same time like we do in parent entity belongs to relations |
| 187 | 187 | $valuesWithRelations = $this->associateHasOneBelongsTo($belongsToRelations, $relationData['values'], $relation->getModel()); |
| 188 | 188 | |
| 189 | - $relationData['relations'] = Arr::where($relationData['relations'], function ($item) { |
|
| 189 | + $relationData['relations'] = Arr::where($relationData['relations'], function($item) { |
|
| 190 | 190 | return $item['relation_type'] != 'BelongsTo'; |
| 191 | 191 | }); |
| 192 | 192 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | private function getRelationDataFromFormData($data) |
| 234 | 234 | { |
| 235 | 235 | // exclude the already attached belongs to relations but include nested belongs to. |
| 236 | - $relation_fields = Arr::where($this->getRelationFields(), function ($field, $key) { |
|
| 236 | + $relation_fields = Arr::where($this->getRelationFields(), function($field, $key) { |
|
| 237 | 237 | return $field['relation_type'] !== 'BelongsTo' || $this->isNestedRelation($field); |
| 238 | 238 | }); |
| 239 | 239 | |
@@ -244,14 +244,14 @@ discard block |
||
| 244 | 244 | if (isset($relation_field['pivot']) && $relation_field['pivot'] !== true) { |
| 245 | 245 | $key = implode('.relations.', explode('.', $this->getOnlyRelationEntity($relation_field))); |
| 246 | 246 | $fieldData = Arr::get($relationData, 'relations.'.$key, []); |
| 247 | - if (! array_key_exists('model', $fieldData)) { |
|
| 247 | + if (!array_key_exists('model', $fieldData)) { |
|
| 248 | 248 | $fieldData['model'] = $relation_field['model']; |
| 249 | 249 | } |
| 250 | - if (! array_key_exists('parent', $fieldData)) { |
|
| 250 | + if (!array_key_exists('parent', $fieldData)) { |
|
| 251 | 251 | $fieldData['parent'] = $this->getRelationModel($attributeKey, -1); |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | - if (! array_key_exists('relation_type', $fieldData)) { |
|
| 254 | + if (!array_key_exists('relation_type', $fieldData)) { |
|
| 255 | 255 | $fieldData['relation_type'] = $relation_field['relation_type']; |
| 256 | 256 | } |
| 257 | 257 | $relatedAttribute = Arr::last(explode('.', $attributeKey)); |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | $related_method = Arr::last($entity_array); |
| 274 | 274 | |
| 275 | - if (! method_exists($relation_model, $related_method)) { |
|
| 275 | + if (!method_exists($relation_model, $related_method)) { |
|
| 276 | 276 | if (count($entity_array) <= 1) { |
| 277 | 277 | return $relation_field['entity']; |
| 278 | 278 | } else { |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | return collect($this->fields()) |
| 60 | 60 | ->where('model') |
| 61 | 61 | ->whereIn('relation_type', $relation_types) |
| 62 | - ->filter(function ($item) { |
|
| 62 | + ->filter(function($item) { |
|
| 63 | 63 | return Str::contains($item['entity'], '.') ? false : true; |
| 64 | 64 | }) |
| 65 | 65 | ->toArray(); |