@@ -90,13 +90,13 @@ |
||
90 | 90 | $store->register($this->outerKey, null, true); |
91 | 91 | $rNode->getState()->decClaim(); |
92 | 92 | |
93 | - return new Condition($store, function () use ($rNode) { |
|
93 | + return new Condition($store, function() use ($rNode) { |
|
94 | 94 | return !$rNode->getState()->hasClaims(); |
95 | 95 | }); |
96 | 96 | } |
97 | 97 | |
98 | 98 | // only delete original child when no other objects claim it |
99 | - return new Condition($this->orm->queueDelete($original), function () use ($rNode) { |
|
99 | + return new Condition($this->orm->queueDelete($original), function() use ($rNode) { |
|
100 | 100 | return !$rNode->getState()->hasClaims(); |
101 | 101 | }); |
102 | 102 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | protected function calcDeleted(array $related, array $original) |
124 | 124 | { |
125 | - return array_udiff($original ?? [], $related, function ($a, $b) { |
|
125 | + return array_udiff($original ?? [], $related, function($a, $b) { |
|
126 | 126 | return strcmp(spl_object_hash($a), spl_object_hash($b)); |
127 | 127 | }); |
128 | 128 | } |
@@ -166,12 +166,12 @@ discard block |
||
166 | 166 | $store->register($this->outerKey, null, true); |
167 | 167 | $rNode->getState()->decClaim(); |
168 | 168 | |
169 | - return new Condition($store, function () use ($rNode) { |
|
169 | + return new Condition($store, function() use ($rNode) { |
|
170 | 170 | return !$rNode->getState()->hasClaims(); |
171 | 171 | }); |
172 | 172 | } |
173 | 173 | |
174 | - return new Condition($this->orm->queueDelete($related), function () use ($rNode) { |
|
174 | + return new Condition($this->orm->queueDelete($related), function() use ($rNode) { |
|
175 | 175 | return !$rNode->getState()->hasClaims(); |
176 | 176 | }); |
177 | 177 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $key = $value = ''; |
80 | 80 | foreach ($scope as $k => $v) { |
81 | 81 | $key .= $k; |
82 | - $value .= $v . '/'; |
|
82 | + $value .= $v.'/'; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | return $this->paths[$role][$key][$value] ?? null; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $keyName = $value = ''; |
99 | 99 | foreach ($key as $k) { |
100 | 100 | $keyName .= $k; // chance of collision? |
101 | - $value .= $data[$k] . '/'; |
|
101 | + $value .= $data[$k].'/'; |
|
102 | 102 | } |
103 | 103 | $key = $keyName; |
104 | 104 | } else { |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | if ($minify) { |
60 | 60 | //Let's use column number instead of full name |
61 | - $column = 'c' . count($columns); |
|
61 | + $column = 'c'.count($columns); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $columns[] = "{$alias}.{$external} AS {$prefix}{$column}"; |
@@ -81,7 +81,7 @@ |
||
81 | 81 | */ |
82 | 82 | public function getPK(): string |
83 | 83 | { |
84 | - return $this->getAlias() . '.' . $this->fieldAlias($this->define(Schema::PRIMARY_KEY)); |
|
84 | + return $this->getAlias().'.'.$this->fieldAlias($this->define(Schema::PRIMARY_KEY)); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -276,11 +276,11 @@ discard block |
||
276 | 276 | return $this->options['as']; |
277 | 277 | } |
278 | 278 | |
279 | - $alias = $parent->getAlias() . '_' . $this->name; |
|
279 | + $alias = $parent->getAlias().'_'.$this->name; |
|
280 | 280 | |
281 | 281 | if ($this->isLoaded() && $this->isJoined()) { |
282 | 282 | // to avoid collisions |
283 | - return 'l_' . $alias; |
|
283 | + return 'l_'.$alias; |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | return $alias; |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | return null; |
303 | 303 | } |
304 | 304 | |
305 | - return $this->getAlias() . '.' . $this->fieldAlias($this->schema[$key]); |
|
305 | + return $this->getAlias().'.'.$this->fieldAlias($this->schema[$key]); |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | /** |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | */ |
314 | 314 | protected function parentKey($key): string |
315 | 315 | { |
316 | - return $this->parent->getAlias() . '.' . $this->parent->fieldAlias($this->schema[$key]); |
|
316 | + return $this->parent->getAlias().'.'.$this->parent->fieldAlias($this->schema[$key]); |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | /** |
@@ -211,10 +211,10 @@ discard block |
||
211 | 211 | $call = $this->forward; |
212 | 212 | break; |
213 | 213 | case 'orwhere': |
214 | - $call = 'or' . ucfirst($this->forward); |
|
214 | + $call = 'or'.ucfirst($this->forward); |
|
215 | 215 | break; |
216 | 216 | case 'andwhere': |
217 | - $call = 'and' . ucfirst($this->forward); |
|
217 | + $call = 'and'.ucfirst($this->forward); |
|
218 | 218 | break; |
219 | 219 | } |
220 | 220 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | |
246 | 246 | if ($args[0] instanceof Closure) { |
247 | - $args[0] = $args[0] = function ($q) use ($args): void { |
|
247 | + $args[0] = $args[0] = function($q) use ($args): void { |
|
248 | 248 | $args[0]($this->withQuery($q)); |
249 | 249 | }; |
250 | 250 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | if ($value instanceof Closure) { |
268 | - $value = function ($q) use ($value): void { |
|
268 | + $value = function($q) use ($value): void { |
|
269 | 269 | $value($this->withQuery($q)); |
270 | 270 | }; |
271 | 271 | } |
@@ -116,7 +116,7 @@ |
||
116 | 116 | */ |
117 | 117 | public function configureQuery(SelectQuery $query, array $outerKeys = []): SelectQuery |
118 | 118 | { |
119 | - if ($this->isLoaded() && $this->isJoined() && (int)$query->getLimit() !== 0) { |
|
119 | + if ($this->isLoaded() && $this->isJoined() && (int) $query->getLimit() !== 0) { |
|
120 | 120 | throw new LoaderException('Unable to load data using join with limit on parent query'); |
121 | 121 | } |
122 | 122 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | public function configureQuery(SelectQuery $query, array $outerKeys = []): SelectQuery |
58 | 58 | { |
59 | - if ($this->isLoaded() && $this->isJoined() && (int)$query->getLimit() !== 0) { |
|
59 | + if ($this->isLoaded() && $this->isJoined() && (int) $query->getLimit() !== 0) { |
|
60 | 60 | throw new LoaderException('Unable to load data using join with limit on parent query'); |
61 | 61 | } |
62 | 62 |