Test Failed
Push — master ( 02e195...4153ba )
by Sergey
11:58 queued 08:20
created
src/EagerLoadedDataList.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
@@ -215,12 +215,12 @@  discard block
 block discarded – undo
215 215
 
216 216
             $idsQuery = SQLSelect::create(
217 217
                 [
218
-                    '"' . $component['childField'] . '"',
219
-                    '"' . $component['parentField'] . '"',
218
+                    '"'.$component['childField'].'"',
219
+                    '"'.$component['parentField'].'"',
220 220
                 ],
221
-                '"' . $component['join'] . '"',
221
+                '"'.$component['join'].'"',
222 222
                 [
223
-                    '"' . $component['parentField'] . '" IN (' . implode(',', $data) . ')'
223
+                    '"'.$component['parentField'].'" IN ('.implode(',', $data).')'
224 224
                 ]
225 225
             )->execute();
226 226
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             }
238 238
 
239 239
             $result = DataObject::get($depClass)->filter('ID', array_keys($relListReverted));
240
-            if (count($depSeq)>1) {
240
+            if (count($depSeq) > 1) {
241 241
                 $result = $result
242 242
                     ->with(implode('.', array_slice($depSeq, 1)));
243 243
             }
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
             }
278 278
             if (!method_exists($item, 'addEagerRelation')) {
279 279
                 throw new EagerLoadingException(
280
-                    "Model {$item->ClassName} must include " .
281
-                    EagerLoaderMultiAccessor::class .
280
+                    "Model {$item->ClassName} must include ".
281
+                    EagerLoaderMultiAccessor::class.
282 282
                     " trait to use eager loading for \$has_many"
283 283
                 );
284 284
             }
@@ -300,8 +300,8 @@  discard block
 block discarded – undo
300 300
             }
301 301
             if (!method_exists($item, 'addEagerRelation')) {
302 302
                 throw new EagerLoadingException(
303
-                    "Model {$item->ClassName} must include " .
304
-                    EagerLoaderMultiAccessor::class .
303
+                    "Model {$item->ClassName} must include ".
304
+                    EagerLoaderMultiAccessor::class.
305 305
                     " trait to use eager loading for \$many_many"
306 306
                 );
307 307
             }
Please login to merge, or discard this patch.