@@ -27,7 +27,7 @@ |
||
27 | 27 | } |
28 | 28 | $this->owner->withListOriginal = $list; |
29 | 29 | $list = array_map( |
30 | - function ($e) { |
|
30 | + function($e) { |
|
31 | 31 | return explode('.', $e); |
32 | 32 | }, |
33 | 33 | $list |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | return array_filter( |
65 | 65 | $this->withList, |
66 | - function ($dep) use ($list) { |
|
66 | + function($dep) use ($list) { |
|
67 | 67 | return array_key_exists($dep[0], $list); |
68 | 68 | } |
69 | 69 | ); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | if (!count($withHasOnes) && !count($withHasManys) && !count($withManyManys) && !count($withBelongsManyManys)) { |
92 | 92 | throw new EagerLoadingException( |
93 | - "Invalid names supplied for ->with(" . implode(', ', $this->withListOriginal) . ")" |
|
93 | + "Invalid names supplied for ->with(".implode(', ', $this->withListOriginal).")" |
|
94 | 94 | ); |
95 | 95 | } |
96 | 96 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $fields[] = "{$dep}ID"; |
125 | 125 | } |
126 | 126 | $table = Config::forClass($this->dataClass)->get('table_name'); |
127 | - $data = new SQLSelect(implode(',', $fields), [$table], ["ID IN (" . implode(',', $ids) . ")"]); |
|
127 | + $data = new SQLSelect(implode(',', $fields), [$table], ["ID IN (".implode(',', $ids).")"]); |
|
128 | 128 | $data = Utils::EnsureArray($data->execute(), 'ID'); |
129 | 129 | |
130 | 130 | foreach ($withHasOnes as $depSeq) { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | while (count($uniqueIDs)) { |
143 | 143 | $IDsubset = array_splice($uniqueIDs, 0, self::ID_LIMIT); |
144 | 144 | $result = DataObject::get($depClass)->filter('ID', $IDsubset); |
145 | - if (count($depSeq)>1) { |
|
145 | + if (count($depSeq) > 1) { |
|
146 | 146 | $result = $result |
147 | 147 | ->with(implode('.', array_slice($depSeq, 1))); |
148 | 148 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | 'map' => [], |
174 | 174 | ]; |
175 | 175 | $result = DataObject::get($depClass)->filter($depKey, $data); |
176 | - if (count($depSeq)>1) { |
|
176 | + if (count($depSeq) > 1) { |
|
177 | 177 | $result = $result |
178 | 178 | ->with(implode('.', array_slice($depSeq, 1))); |
179 | 179 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | implode(',', [$component['childField'], $component['parentField']]), |
213 | 213 | $component['join'], |
214 | 214 | [ |
215 | - $component['parentField'] . ' IN (' . implode(',', $data) . ')' |
|
215 | + $component['parentField'].' IN ('.implode(',', $data).')' |
|
216 | 216 | ] |
217 | 217 | )->execute(); |
218 | 218 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } |
230 | 230 | |
231 | 231 | $result = DataObject::get($depClass)->filter('ID', array_keys($relListReverted)); |
232 | - if (count($depSeq)>1) { |
|
232 | + if (count($depSeq) > 1) { |
|
233 | 233 | $result = $result |
234 | 234 | ->with(implode('.', array_slice($depSeq, 1))); |
235 | 235 | } |
@@ -269,8 +269,8 @@ discard block |
||
269 | 269 | } |
270 | 270 | if (!method_exists($item, 'addEagerRelation')) { |
271 | 271 | throw new EagerLoadingException( |
272 | - "Model {$item->ClassName} must include " . |
|
273 | - EagerLoaderMultiAccessor::class . |
|
272 | + "Model {$item->ClassName} must include ". |
|
273 | + EagerLoaderMultiAccessor::class. |
|
274 | 274 | " trait to use eager loading for \$has_many" |
275 | 275 | ); |
276 | 276 | } |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | } |
293 | 293 | if (!method_exists($item, 'addEagerRelation')) { |
294 | 294 | throw new EagerLoadingException( |
295 | - "Model {$item->ClassName} must include " . |
|
296 | - EagerLoaderMultiAccessor::class . |
|
295 | + "Model {$item->ClassName} must include ". |
|
296 | + EagerLoaderMultiAccessor::class. |
|
297 | 297 | " trait to use eager loading for \$many_many" |
298 | 298 | ); |
299 | 299 | } |