Test Failed
Push — master ( 324ce1...c0782f )
by Sébastien
09:01
created
src/Repository/EntityRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      */
300 300
     public function loadRelations($entity, $relations)
301 301
     {
302
-        foreach (Relation::sanitizeRelations((array)$relations) as $relationName => $meta) {
302
+        foreach (Relation::sanitizeRelations((array) $relations) as $relationName => $meta) {
303 303
             $this->relation($relationName)->loadIfNotLoaded(
304 304
                 new SingleEntityIndexer($this->mapper, $entity),
305 305
                 $meta['relations'],
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      */
321 321
     public function reloadRelations($entity, $relations)
322 322
     {
323
-        foreach (Relation::sanitizeRelations((array)$relations) as $relationName => $meta) {
323
+        foreach (Relation::sanitizeRelations((array) $relations) as $relationName => $meta) {
324 324
             $this->relation($relationName)->load(
325 325
                 new SingleEntityIndexer($this->mapper, $entity),
326 326
                 $meta['relations'],
@@ -364,12 +364,12 @@  discard block
 block discarded – undo
364 364
      */
365 365
     public function saveAll($entity, $relations)
366 366
     {
367
-        $relations = Relation::sanitizeRelations((array)$relations);
367
+        $relations = Relation::sanitizeRelations((array) $relations);
368 368
 
369 369
         return $this->transaction(function() use($entity, $relations) {
370 370
             $nb = $this->save($entity);
371 371
 
372
-            foreach ((array)$relations as $relationName => $info) {
372
+            foreach ((array) $relations as $relationName => $info) {
373 373
                 $nb += $this->relation($relationName)->saveAll($entity, $info['relations']);
374 374
             }
375 375
 
@@ -387,12 +387,12 @@  discard block
 block discarded – undo
387 387
      */
388 388
     public function deleteAll($entity, $relations)
389 389
     {
390
-        $relations = Relation::sanitizeRelations((array)$relations);
390
+        $relations = Relation::sanitizeRelations((array) $relations);
391 391
 
392 392
         return $this->transaction(function() use($entity, $relations) {
393 393
             $nb = $this->delete($entity);
394 394
 
395
-            foreach ((array)$relations as $relationName => $info) {
395
+            foreach ((array) $relations as $relationName => $info) {
396 396
                 $nb += $this->relation($relationName)->deleteAll($entity, $info['relations']);
397 397
             }
398 398
 
Please login to merge, or discard this patch.
src/Query/Custom/KeyValue/KeyValueQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
         $this->statements['offset'] = null;
187 187
         $this->statements['aggregate'] = ['count', $columns ?: '*'];
188 188
 
189
-        $count = (int)$this->execute()[0]['aggregate'];
189
+        $count = (int) $this->execute()[0]['aggregate'];
190 190
 
191 191
         $this->compilerState->invalidate();
192 192
         $this->statements = $statements;
Please login to merge, or discard this patch.
src/Query/QueryRepositoryExtension.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             return $entity;
127 127
         }
128 128
 
129
-        throw new EntityNotFoundException('Cannot resolve entity identifier "'.implode('", "', (array)$id).'"');
129
+        throw new EntityNotFoundException('Cannot resolve entity identifier "'.implode('", "', (array) $id).'"');
130 130
     }
131 131
 
132 132
     /**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function with(ReadCommandInterface $query, $relations)
174 174
     {
175
-        $this->withRelations = Relation::sanitizeRelations((array)$relations);
175
+        $this->withRelations = Relation::sanitizeRelations((array) $relations);
176 176
 
177 177
         return $query;
178 178
     }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      */
188 188
     public function without(ReadCommandInterface $query, $relations)
189 189
     {
190
-        $this->withoutRelations = Relation::sanitizeWithoutRelations((array)$relations);
190
+        $this->withoutRelations = Relation::sanitizeWithoutRelations((array) $relations);
191 191
 
192 192
         return $query;
193 193
     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         $scopes = $this->repository->scopes();
286 286
 
287 287
         if (!isset($scopes[$name])) {
288
-            throw new BadMethodCallException('Method "' . get_class($this->repository) . '::' . $name . '" not found');
288
+            throw new BadMethodCallException('Method "'.get_class($this->repository).'::'.$name.'" not found');
289 289
         }
290 290
 
291 291
         return $scopes[$name](...$arguments);
Please login to merge, or discard this patch.
src/Query/Clause.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
                     $this->buildRaw($statement, $value, $glue);
127 127
                 } else {
128 128
                     // Column with operator
129
-                    $key  = explode(' ', trim($key), 2);
129
+                    $key = explode(' ', trim($key), 2);
130 130
                     $parts[] = [
131 131
                         'column'    => $key[0],
132 132
                         'operator'  => isset($key[1]) ? $key[1] : '=',
Please login to merge, or discard this patch.
src/Query/Expression/Raw.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     public function __toString()
35 35
     {
36
-        return (string)$this->value;
36
+        return (string) $this->value;
37 37
     }
38 38
     
39 39
     /**
Please login to merge, or discard this patch.
src/Query/Compiler/CompilerState.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
         //TODO quand doit on unset l'index '0' ?
59 59
 
60
-        foreach ((array)$parts as $part) {
60
+        foreach ((array) $parts as $part) {
61 61
             unset($this->bindings[$part]);
62 62
             unset($this->compiledParts[$part]);
63 63
         }
Please login to merge, or discard this patch.
src/Query/Compiler/AliasResolver/AliasResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -398,7 +398,7 @@
 block discarded – undo
398 398
             }
399 399
 
400 400
             // If we have polymophism, add to alias
401
-            $relation->join($this->query, $alias . (isset($relationName[1]) ? '#' . $relationName[1] : ''));
401
+            $relation->join($this->query, $alias.(isset($relationName[1]) ? '#'.$relationName[1] : ''));
402 402
             $relation->setLocalAlias(null);
403 403
         }
404 404
 
Please login to merge, or discard this patch.
src/Query/Query.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function ignore($flag = true)
140 140
     {
141
-        $this->statements['ignore'] = (bool)$flag;
141
+        $this->statements['ignore'] = (bool) $flag;
142 142
         
143 143
         return $this;
144 144
     }
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $this->statements['offset'] = null;
270 270
         $this->statements['aggregate'] = ['pagination', $this->getPaginationColumns($columns)];
271 271
 
272
-        $count = (int)$this->execute()[0]['aggregate'];
272
+        $count = (int) $this->execute()[0]['aggregate'];
273 273
 
274 274
         $this->compilerState->invalidate(['columns', 'orders']);
275 275
         $this->statements = $statements;
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
      */
314 314
     public function count($column = null)
315 315
     {
316
-        return (int)$this->aggregate(__FUNCTION__, $column);
316
+        return (int) $this->aggregate(__FUNCTION__, $column);
317 317
     }
318 318
 
319 319
     /**
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
      */
322 322
     public function avg($column = null)
323 323
     {
324
-        return (float)$this->aggregate(__FUNCTION__, $column);
324
+        return (float) $this->aggregate(__FUNCTION__, $column);
325 325
     }
326 326
 
327 327
     /**
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      */
330 330
     public function min($column = null)
331 331
     {
332
-        return (float)$this->aggregate(__FUNCTION__, $column);
332
+        return (float) $this->aggregate(__FUNCTION__, $column);
333 333
     }
334 334
 
335 335
     /**
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
      */
338 338
     public function max($column = null)
339 339
     {
340
-        return (float)$this->aggregate(__FUNCTION__, $column);
340
+        return (float) $this->aggregate(__FUNCTION__, $column);
341 341
     }
342 342
 
343 343
     /**
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
      */
346 346
     public function sum($column = null)
347 347
     {
348
-        return (float)$this->aggregate(__FUNCTION__, $column);
348
+        return (float) $this->aggregate(__FUNCTION__, $column);
349 349
     }
350 350
 
351 351
     /**
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
     {
375 375
         $this->compilerState->invalidate('columns');
376 376
         
377
-        $this->statements['distinct'] = (bool)$flag;
377
+        $this->statements['distinct'] = (bool) $flag;
378 378
         
379 379
         return $this;
380 380
     }
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
         # build a regular expression for each parameter
560 560
         foreach ($values as $key => $value) {
561 561
             if (is_string($key)) {
562
-                $keys[] = '/:' . $key . '/';
562
+                $keys[] = '/:'.$key.'/';
563 563
             } else {
564 564
                 $keys[] = '/[?]/';
565 565
             }
Please login to merge, or discard this patch.
src/Query/Pagination/AbstractPaginator.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function pushAll(array $items)
181 181
     {
182 182
         if (!($this->collection instanceof CollectionInterface)) {
183
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
183
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
184 184
         }
185 185
         
186 186
         $this->collection->pushAll($items);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     public function push($item)
195 195
     {
196 196
         if (!($this->collection instanceof CollectionInterface)) {
197
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
197
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
198 198
         }
199 199
         
200 200
         $this->collection->push($item);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     public function put($key, $item)
209 209
     {
210 210
         if (!($this->collection instanceof CollectionInterface)) {
211
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
211
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
212 212
         }
213 213
         
214 214
         $this->collection->put($key, $item);
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     public function get($key, $default = null)
245 245
     {
246 246
         if (!($this->collection instanceof CollectionInterface)) {
247
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
247
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
248 248
         }
249 249
         
250 250
         return $this->collection->get($key, $default);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     public function has($key)
267 267
     {
268 268
         if (!($this->collection instanceof CollectionInterface)) {
269
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
269
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
270 270
         }
271 271
         
272 272
         return $this->collection->has($key);
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     public function remove($key)
289 289
     {
290 290
         if (!($this->collection instanceof CollectionInterface)) {
291
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
291
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
292 292
         }
293 293
         
294 294
         $this->collection->remove($key);
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     public function clear()
313 313
     {
314 314
         if (!($this->collection instanceof CollectionInterface)) {
315
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
315
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
316 316
         }
317 317
         
318 318
         $this->collection->clear();
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     public function keys()
327 327
     {
328 328
         if (!($this->collection instanceof CollectionInterface)) {
329
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
329
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
330 330
         }
331 331
         
332 332
         return $this->collection->keys();
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     public function isEmpty()
339 339
     {
340 340
         if (!($this->collection instanceof CollectionInterface)) {
341
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
341
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
342 342
         }
343 343
         
344 344
         return $this->collection->isEmpty();
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
     public function map($callback)
351 351
     {
352 352
         if (!($this->collection instanceof CollectionInterface)) {
353
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
353
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
354 354
         }
355 355
         
356 356
         $this->collection = $this->collection->map($callback);
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
     public function filter($callback = null)
365 365
     {
366 366
         if (!($this->collection instanceof CollectionInterface)) {
367
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
367
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
368 368
         }
369 369
         
370 370
         $this->collection = $this->collection->filter($callback);
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
     public function groupBy($groupBy, $mode = PaginatorInterface::GROUPBY)
379 379
     {
380 380
         if (!($this->collection instanceof CollectionInterface)) {
381
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
381
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
382 382
         }
383 383
         
384 384
         $this->collection = $this->collection->groupBy($groupBy, $mode);
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
     public function contains($element)
393 393
     {
394 394
         if (!($this->collection instanceof CollectionInterface)) {
395
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
395
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
396 396
         }
397 397
         
398 398
         return $this->collection->contains($element);
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
     public function indexOf($value, $strict = false)
405 405
     {
406 406
         if (!($this->collection instanceof CollectionInterface)) {
407
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
407
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
408 408
         }
409 409
         
410 410
         return $this->collection->indexOf($value, $strict);
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
     public function merge($items)
417 417
     {
418 418
         if (!($this->collection instanceof CollectionInterface)) {
419
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
419
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
420 420
         }
421 421
         
422 422
         $this->collection = $this->collection->merge($items);
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     public function sort(callable $callback = null)
431 431
     {
432 432
         if (!($this->collection instanceof CollectionInterface)) {
433
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
433
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
434 434
         }
435 435
         
436 436
         $this->collection = $this->collection->sort($callback);
Please login to merge, or discard this patch.