@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | return array_filter( |
| 64 | 64 | $this->withList, |
| 65 | - function ($dep) use ($list) { |
|
| 65 | + function($dep) use ($list) { |
|
| 66 | 66 | return array_key_exists($dep[0], $list); |
| 67 | 67 | } |
| 68 | 68 | ); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $fields[] = "{$dep}ID"; |
| 124 | 124 | } |
| 125 | 125 | $table = Config::forClass($this->dataClass)->get('table_name'); |
| 126 | - $data = new SQLSelect(implode(',', $fields), [$table], ["ID IN (" . implode(',', $ids) . ")"]); |
|
| 126 | + $data = new SQLSelect(implode(',', $fields), [$table], ["ID IN (".implode(',', $ids).")"]); |
|
| 127 | 127 | $data = Utils::EnsureArray($data->execute(), 'ID'); |
| 128 | 128 | |
| 129 | 129 | foreach ($withHasOnes as $depSeq) { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | while (count($uniqueIDs)) { |
| 144 | 144 | $IDsubset = array_splice($uniqueIDs, 0, self::ID_LIMIT); |
| 145 | 145 | $result = DataObject::get($depClass)->filter('ID', $IDsubset); |
| 146 | - if (count($depSeq)>1) { |
|
| 146 | + if (count($depSeq) > 1) { |
|
| 147 | 147 | $result = $result |
| 148 | 148 | ->with(implode('.', array_slice($depSeq, 1))); |
| 149 | 149 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | 'map' => [], |
| 175 | 175 | ]; |
| 176 | 176 | $result = DataObject::get($depClass)->filter($depKey, $data); |
| 177 | - if (count($depSeq)>1) { |
|
| 177 | + if (count($depSeq) > 1) { |
|
| 178 | 178 | $result = $result |
| 179 | 179 | ->with(implode('.', array_slice($depSeq, 1))); |
| 180 | 180 | } |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | implode(',', [$component['childField'], $component['parentField']]), |
| 214 | 214 | $component['join'], |
| 215 | 215 | [ |
| 216 | - $component['parentField'] . ' IN (' . implode(',', $data) . ')' |
|
| 216 | + $component['parentField'].' IN ('.implode(',', $data).')' |
|
| 217 | 217 | ] |
| 218 | 218 | )->execute(); |
| 219 | 219 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | $result = DataObject::get($depClass)->filter('ID', array_keys($relListReverted)); |
| 233 | - if (count($depSeq)>1) { |
|
| 233 | + if (count($depSeq) > 1) { |
|
| 234 | 234 | $result = $result |
| 235 | 235 | ->with(implode('.', array_slice($depSeq, 1))); |
| 236 | 236 | } |
@@ -270,8 +270,8 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | if (!method_exists($item, 'addEagerRelation')) { |
| 272 | 272 | throw new \Exception( |
| 273 | - "Model {$item->ClassName} must include " . |
|
| 274 | - EagerLoaderMultiAccessor::class . |
|
| 273 | + "Model {$item->ClassName} must include ". |
|
| 274 | + EagerLoaderMultiAccessor::class. |
|
| 275 | 275 | " trait to use eager loading for \$has_many" |
| 276 | 276 | ); |
| 277 | 277 | } |
@@ -293,8 +293,8 @@ discard block |
||
| 293 | 293 | } |
| 294 | 294 | if (!method_exists($item, 'addEagerRelation')) { |
| 295 | 295 | throw new \Exception( |
| 296 | - "Model {$item->ClassName} must include " . |
|
| 297 | - EagerLoaderMultiAccessor::class . |
|
| 296 | + "Model {$item->ClassName} must include ". |
|
| 297 | + EagerLoaderMultiAccessor::class. |
|
| 298 | 298 | " trait to use eager loading for \$has_many" |
| 299 | 299 | ); |
| 300 | 300 | } |