@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | |
210 | 210 | $this->query->addSelect($columns); |
211 | 211 | |
212 | - return tap($this->query->paginate($perPage, $columns, $pageName, $page), function (Paginator $paginator) { |
|
212 | + return tap($this->query->paginate($perPage, $columns, $pageName, $page), function(Paginator $paginator) { |
|
213 | 213 | $this->hydrateIntermediateRelations($paginator->items()); |
214 | 214 | }); |
215 | 215 | } |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | |
232 | 232 | $this->query->addSelect($columns); |
233 | 233 | |
234 | - return tap($this->query->simplePaginate($perPage, $columns, $pageName, $page), function (Paginator $paginator) { |
|
234 | + return tap($this->query->simplePaginate($perPage, $columns, $pageName, $page), function(Paginator $paginator) { |
|
235 | 235 | $this->hydrateIntermediateRelations($paginator->items()); |
236 | 236 | }); |
237 | 237 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | */ |
257 | 257 | public function chunk($count, callable $callback) |
258 | 258 | { |
259 | - return $this->prepareQueryBuilder()->chunk($count, function (Collection $results) use ($callback) { |
|
259 | + return $this->prepareQueryBuilder()->chunk($count, function(Collection $results) use ($callback) { |
|
260 | 260 | $this->hydrateIntermediateRelations($results->all()); |
261 | 261 | |
262 | 262 | return $callback($results); |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | } |
325 | 325 | |
326 | 326 | $this->query->getQuery()->wheres = collect($this->query->getQuery()->wheres) |
327 | - ->reject(function ($where) use ($columns) { |
|
327 | + ->reject(function($where) use ($columns) { |
|
328 | 328 | return $where['type'] === 'Null' && in_array($where['column'], $columns); |
329 | 329 | })->values()->all(); |
330 | 330 |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | protected function hasOneOrManyDeepThroughParents(array $through) |
100 | 100 | { |
101 | - return array_map(function ($class) { |
|
101 | + return array_map(function($class) { |
|
102 | 102 | $segments = preg_split('/\s+as\s+/i', $class); |
103 | 103 | |
104 | 104 | $instance = Str::contains($segments[0], '\\') |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | protected function hasOneOrManyDeepForeignKeys(Model $related, array $throughParents, array $foreignKeys) |
125 | 125 | { |
126 | 126 | foreach (array_merge([$this], $throughParents) as $i => $instance) { |
127 | - if (! isset($foreignKeys[$i])) { |
|
127 | + if (!isset($foreignKeys[$i])) { |
|
128 | 128 | if ($instance instanceof Pivot) { |
129 | 129 | $foreignKeys[$i] = ($throughParents[$i] ?? $related)->getKeyName(); |
130 | 130 | } else { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | protected function hasOneOrManyDeepLocalKeys(Model $related, array $throughParents, array $localKeys) |
148 | 148 | { |
149 | 149 | foreach (array_merge([$this], $throughParents) as $i => $instance) { |
150 | - if (! isset($localKeys[$i])) { |
|
150 | + if (!isset($localKeys[$i])) { |
|
151 | 151 | if ($instance instanceof Pivot) { |
152 | 152 | $localKeys[$i] = ($throughParents[$i] ?? $related)->getForeignKey(); |
153 | 153 | } else { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | */ |
385 | 385 | protected function getProtectedProperty(Relation $relation, $property) |
386 | 386 | { |
387 | - $closure = Closure::bind(function (Relation $relation) use ($property) { |
|
387 | + $closure = Closure::bind(function(Relation $relation) use ($property) { |
|
388 | 388 | return $relation->$property; |
389 | 389 | }, null, $relation); |
390 | 390 |