@@ -28,17 +28,17 @@ |
||
28 | 28 | $field = $schema->getFieldByKey($key); |
29 | 29 | |
30 | 30 | // Skip if this is not a defined field. |
31 | - if (! $field) { |
|
31 | + if (!$field) { |
|
32 | 32 | continue; |
33 | 33 | } |
34 | 34 | |
35 | - $with = array_map(function ($with) use ($path) { |
|
35 | + $with = array_map(function($with) use ($path) { |
|
36 | 36 | return $path ? "{$path}.{$with}" : $with; |
37 | 37 | }, $field->getWith() ?? []); |
38 | 38 | |
39 | 39 | $query->with($with); |
40 | 40 | |
41 | - if ($field->isRelationship() && ! $field instanceof PolymorphicField) { |
|
41 | + if ($field->isRelationship() && !$field instanceof PolymorphicField) { |
|
42 | 42 | $accessor = $field->getAccessor(); |
43 | 43 | $related = $schema->getModel()->{$accessor}()->getRelated(); |
44 | 44 | $relatedSchema = $this->registry->getSchemaForModel($related); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $type = $this->registry->ID()->list(); |
57 | 57 | } |
58 | 58 | |
59 | - return $this->modelSchema->getLookupFields()->map(function (Field $field) { |
|
59 | + return $this->modelSchema->getLookupFields()->map(function(Field $field) { |
|
60 | 60 | return $field->getType(); |
61 | 61 | })->merge(['input' => $type])->toArray(); |
62 | 62 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $pivotAccessor = $relation->getPivotAccessor(); |
78 | 78 | $pivotSchema = $this->getPivotModelSchema(); |
79 | 79 | |
80 | - $input->map(function ($input) use ($pivotSchema, $relation, $pivotAccessor, $model) { |
|
80 | + $input->map(function($input) use ($pivotSchema, $relation, $pivotAccessor, $model) { |
|
81 | 81 | $key = $input[$model->getKeyName()] ?? $input; |
82 | 82 | $pivotWhere = $input[$pivotAccessor] ?? []; |
83 | 83 | |
@@ -95,13 +95,13 @@ discard block |
||
95 | 95 | $query->wherePivot($relation->getRelatedPivotKeyName(), $key); |
96 | 96 | |
97 | 97 | return $query; |
98 | - })->map(function (Relations\BelongsToMany $query) use ($modelSchema) { |
|
99 | - $query->each(function (Model $related) use ($modelSchema) { |
|
98 | + })->map(function(Relations\BelongsToMany $query) use ($modelSchema) { |
|
99 | + $query->each(function(Model $related) use ($modelSchema) { |
|
100 | 100 | $modelSchema->authorizeToDetach($related); |
101 | 101 | }); |
102 | 102 | |
103 | 103 | return $query; |
104 | - })->each(function (Relations\BelongsToMany $query) { |
|
104 | + })->each(function(Relations\BelongsToMany $query) { |
|
105 | 105 | $query->detach(); |
106 | 106 | }); |
107 | 107 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | if (is_null($model)) { |
43 | 43 | $model = $this->rootNamespace().$this->argument('name'); |
44 | - } elseif (! Str::startsWith($model, [$this->rootNamespace(), '\\'])) { |
|
44 | + } elseif (!Str::startsWith($model, [$this->rootNamespace(), '\\'])) { |
|
45 | 45 | $model = $this->rootNamespace().$model; |
46 | 46 | } |
47 | 47 |