@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | return array_filter( |
| 66 | 66 | $this->withList, |
| 67 | - function ($dep) use ($list) { |
|
| 67 | + function($dep) use ($list) { |
|
| 68 | 68 | return array_key_exists($dep[0], $list); |
| 69 | 69 | } |
| 70 | 70 | ); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $fields[] = "\"{$dep}ID\""; |
| 124 | 124 | } |
| 125 | 125 | $table = DataObject::getSchema()->tableName($this->dataClass); |
| 126 | - $data = new SQLSelect($fields, '"' . $table . '"', ['"ID" IN (' . implode(',', $ids) . ')']); |
|
| 126 | + $data = new SQLSelect($fields, '"'.$table.'"', ['"ID" IN ('.implode(',', $ids).')']); |
|
| 127 | 127 | $data = Utils::EnsureArray($data->execute(), 'ID'); |
| 128 | 128 | |
| 129 | 129 | foreach ($withHasOnes as $depSeq) { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | while (count($uniqueIDs)) { |
| 142 | 142 | $IDsubset = array_splice($uniqueIDs, 0, self::ID_LIMIT); |
| 143 | 143 | $result = DataObject::get($depClass)->filter('ID', $IDsubset); |
| 144 | - if (count($depSeq)>1) { |
|
| 144 | + if (count($depSeq) > 1) { |
|
| 145 | 145 | $result = $result |
| 146 | 146 | ->with(implode('.', array_slice($depSeq, 1))); |
| 147 | 147 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | 'map' => [], |
| 179 | 179 | ]; |
| 180 | 180 | $result = DataObject::get($depClass)->filter($depKey, $data); |
| 181 | - if (count($depSeq)>1) { |
|
| 181 | + if (count($depSeq) > 1) { |
|
| 182 | 182 | $result = $result |
| 183 | 183 | ->with(implode('.', array_slice($depSeq, 1))); |
| 184 | 184 | } |
@@ -218,12 +218,12 @@ discard block |
||
| 218 | 218 | |
| 219 | 219 | $idsQuery = SQLSelect::create( |
| 220 | 220 | [ |
| 221 | - '"' . $component['childField'] . '"', |
|
| 222 | - '"' . $component['parentField'] . '"', |
|
| 221 | + '"'.$component['childField'].'"', |
|
| 222 | + '"'.$component['parentField'].'"', |
|
| 223 | 223 | ], |
| 224 | - '"' . $table . '"', |
|
| 224 | + '"'.$table.'"', |
|
| 225 | 225 | [ |
| 226 | - '"' . $component['parentField'] . '" IN (' . implode(',', $data) . ')' |
|
| 226 | + '"'.$component['parentField'].'" IN ('.implode(',', $data).')' |
|
| 227 | 227 | ] |
| 228 | 228 | )->execute(); |
| 229 | 229 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | if ($relListReverted) { |
| 243 | 243 | $result = DataObject::get($depClass)->filter('ID', array_keys($relListReverted)); |
| 244 | - if (count($depSeq)>1) { |
|
| 244 | + if (count($depSeq) > 1) { |
|
| 245 | 245 | $result = $result |
| 246 | 246 | ->with(implode('.', array_slice($depSeq, 1))); |
| 247 | 247 | } |
@@ -282,8 +282,8 @@ discard block |
||
| 282 | 282 | } |
| 283 | 283 | if (!method_exists($item, 'addEagerRelation')) { |
| 284 | 284 | throw new EagerLoadingException( |
| 285 | - "Model {$item->ClassName} must include " . |
|
| 286 | - EagerLoaderMultiAccessor::class . |
|
| 285 | + "Model {$item->ClassName} must include ". |
|
| 286 | + EagerLoaderMultiAccessor::class. |
|
| 287 | 287 | " trait to use eager loading for \$has_many" |
| 288 | 288 | ); |
| 289 | 289 | } |
@@ -305,8 +305,8 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | if (!method_exists($item, 'addEagerRelation')) { |
| 307 | 307 | throw new EagerLoadingException( |
| 308 | - "Model {$item->ClassName} must include " . |
|
| 309 | - EagerLoaderMultiAccessor::class . |
|
| 308 | + "Model {$item->ClassName} must include ". |
|
| 309 | + EagerLoaderMultiAccessor::class. |
|
| 310 | 310 | " trait to use eager loading for \$many_many" |
| 311 | 311 | ); |
| 312 | 312 | } |