@@ -176,7 +176,7 @@ |
||
176 | 176 | */ |
177 | 177 | protected function formatIds(array $ids) |
178 | 178 | { |
179 | - return (new BaseCollection($ids))->mapWithKeys(function ($attributes, $id) { |
|
179 | + return (new BaseCollection($ids))->mapWithKeys(function($attributes, $id) { |
|
180 | 180 | if (!is_array($attributes)) { |
181 | 181 | [$id, $attributes] = [$attributes, []]; |
182 | 182 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | $parentKeys = $this->getKeys($models, $this->localKey); |
55 | 55 | |
56 | - $this->query->where(function (Builder $query) use ($parentKeys) { |
|
56 | + $this->query->where(function(Builder $query) use ($parentKeys) { |
|
57 | 57 | foreach ($parentKeys as $parentKey) { |
58 | 58 | if ($this->key) { |
59 | 59 | $parentKey = $this->parentKeyToArray($parentKey); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $key = str_replace('->', '.', $this->key); |
216 | 216 | |
217 | 217 | $record = (new BaseCollection($model->{$this->getPathName()})) |
218 | - ->filter(function ($value) use ($key, $parent) { |
|
218 | + ->filter(function($value) use ($key, $parent) { |
|
219 | 219 | return Arr::get($value, $key) == $parent->{$this->localKey}; |
220 | 220 | })->first(); |
221 | 221 |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $key = str_replace('->', '.', $this->key); |
184 | 184 | |
185 | 185 | $record = (new BaseCollection($parent->{$this->path})) |
186 | - ->filter(function ($value) use ($key, $model) { |
|
186 | + ->filter(function($value) use ($key, $model) { |
|
187 | 187 | return Arr::get($value, $key) == $model->{$this->ownerKey}; |
188 | 188 | })->first(); |
189 | 189 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $model = $model ?: $this->child; |
202 | 202 | |
203 | 203 | return (new BaseCollection($model->{$this->foreignKey}))->filter( |
204 | - function ($key) { |
|
204 | + function($key) { |
|
205 | 205 | return $key !== null; |
206 | 206 | } |
207 | 207 | )->all(); |