@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | $parentKeys = $this->getKeys($models, $this->localKey); |
54 | 54 | |
55 | - $this->query->where(function (Builder $query) use ($parentKeys) { |
|
55 | + $this->query->where(function(Builder $query) use ($parentKeys) { |
|
56 | 56 | foreach ($parentKeys as $parentKey) { |
57 | 57 | if ($this->key) { |
58 | 58 | $parentKey = $this->parentKeyToArray($parentKey); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $key = str_replace('->', '.', $this->key); |
215 | 215 | |
216 | 216 | $record = collect($model->{$this->getPathName()}) |
217 | - ->filter(function ($value) use ($key, $parent) { |
|
217 | + ->filter(function($value) use ($key, $parent) { |
|
218 | 218 | return Arr::get($value, $key) == $parent->{$this->localKey}; |
219 | 219 | })->first(); |
220 | 220 |
@@ -176,7 +176,7 @@ |
||
176 | 176 | */ |
177 | 177 | protected function formatIds(array $ids) |
178 | 178 | { |
179 | - return collect($ids)->mapWithKeys(function ($attributes, $id) { |
|
179 | + return collect($ids)->mapWithKeys(function($attributes, $id) { |
|
180 | 180 | if (!is_array($attributes)) { |
181 | 181 | [$id, $attributes] = [$attributes, []]; |
182 | 182 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | if (static::$constraints) { |
35 | 35 | $table = $this->related->getTable(); |
36 | 36 | |
37 | - $column = is_subclass_of($this->related, \Illuminate\Database\Eloquent\Model::class) ? $table . '.' . $this->ownerKey : $this->ownerKey; |
|
37 | + $column = is_subclass_of($this->related, \Illuminate\Database\Eloquent\Model::class) ? $table.'.'.$this->ownerKey : $this->ownerKey; |
|
38 | 38 | |
39 | 39 | $this->query->whereIn($column, $this->getForeignKeys()); |
40 | 40 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $key = str_replace('->', '.', $this->key); |
184 | 184 | |
185 | 185 | $record = collect($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 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | $keys = (array) $model->{$this->foreignKey}; |
204 | 204 | |
205 | - return array_filter($keys, function ($key) { |
|
205 | + return array_filter($keys, function($key) { |
|
206 | 206 | return $key !== null; |
207 | 207 | }); |
208 | 208 | } |