Test Failed
Push — fix-some-1 ( 7e7382 )
by Sergey
05: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 = Config::forClass($this->dataClass)->get('table_name');
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
                 }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                 'map' => [],
173 173
             ];
174 174
             $result = DataObject::get($depClass)->filter($depKey, $data);
175
-            if (count($depSeq)>1) {
175
+            if (count($depSeq) > 1) {
176 176
                 $result = $result
177 177
                     ->with(implode('.', array_slice($depSeq, 1)));
178 178
             }
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
 
210 210
             $idsQuery = SQLSelect::create(
211 211
                 [
212
-                    '"' . $component['childField'] . '"',
213
-                    '"' . $component['parentField'] . '"',
212
+                    '"'.$component['childField'].'"',
213
+                    '"'.$component['parentField'].'"',
214 214
                 ],
215
-                '"' . $component['join'] . '"',
215
+                '"'.$component['join'].'"',
216 216
                 [
217
-                    '"' . $component['parentField'] . '" IN (' . implode(',', $data) . ')'
217
+                    '"'.$component['parentField'].'" IN ('.implode(',', $data).')'
218 218
                 ]
219 219
             )->execute();
220 220
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
             }
232 232
 
233 233
             $result = DataObject::get($depClass)->filter('ID', array_keys($relListReverted));
234
-            if (count($depSeq)>1) {
234
+            if (count($depSeq) > 1) {
235 235
                 $result = $result
236 236
                     ->with(implode('.', array_slice($depSeq, 1)));
237 237
             }
@@ -271,8 +271,8 @@  discard block
 block discarded – undo
271 271
             }
272 272
             if (!method_exists($item, 'addEagerRelation')) {
273 273
                 throw new EagerLoadingException(
274
-                    "Model {$item->ClassName} must include " .
275
-                    EagerLoaderMultiAccessor::class .
274
+                    "Model {$item->ClassName} must include ".
275
+                    EagerLoaderMultiAccessor::class.
276 276
                     " trait to use eager loading for \$has_many"
277 277
                 );
278 278
             }
@@ -294,8 +294,8 @@  discard block
 block discarded – undo
294 294
             }
295 295
             if (!method_exists($item, 'addEagerRelation')) {
296 296
                 throw new EagerLoadingException(
297
-                    "Model {$item->ClassName} must include " .
298
-                    EagerLoaderMultiAccessor::class .
297
+                    "Model {$item->ClassName} must include ".
298
+                    EagerLoaderMultiAccessor::class.
299 299
                     " trait to use eager loading for \$many_many"
300 300
                 );
301 301
             }
Please login to merge, or discard this patch.