@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | |
41 | 41 | public function __construct(array $rows = []) |
42 | 42 | { |
43 | - $this->rows = $rows; |
|
43 | + $this->rows = $rows; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function setRelation($name, Relation $relation, $callback, array $nextLoad = [], $overwrite = false) |
47 | 47 | { |
48 | - if ($overwrite || ! isset($this->relations[$name])) { |
|
48 | + if ($overwrite || !isset($this->relations[$name])) { |
|
49 | 49 | $this->relations[$name] = $relation; |
50 | 50 | $this->relationCallback[$name] = $callback; |
51 | 51 | if (!empty($nextLoad)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | public function getResultsForRelation($name) |
63 | 63 | { |
64 | - if (! isset($this->relations[$name])) { |
|
64 | + if (!isset($this->relations[$name])) { |
|
65 | 65 | return []; |
66 | 66 | } |
67 | 67 | |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | /** @var Query $query */ |
88 | - $query = $aggregate->getQuery($this); |
|
88 | + $query = $aggregate->getQuery($this); |
|
89 | 89 | |
90 | - $results = $query->fetchAll(); |
|
90 | + $results = $query->fetchAll(); |
|
91 | 91 | $this->aggregateResults[$name] = $results instanceof Collection ? $results->getValues() : $results; |
92 | 92 | |
93 | 93 | return $this->aggregateResults[$name]; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | } |
159 | 159 | |
160 | 160 | $queryNextLoad = $this->relationNextLoad[$name] ?? []; |
161 | - if ($queryNextLoad && ! empty($queryNextLoad)) { |
|
161 | + if ($queryNextLoad && !empty($queryNextLoad)) { |
|
162 | 162 | foreach ($queryNextLoad as $next => $callback) { |
163 | 163 | $query = $query->load([$next => $callback]); |
164 | 164 | } |