Passed
Branch master (dc0585)
by Vincent
07: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/Compiler/SqlCompiler.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
         return $query->state()->compiled = 'UPDATE '
175 175
             . $this->quoteIdentifier($query, $query->statements['tables'][0]['table'])
176
-            . ' SET ' . implode(', ', $values)
176
+            . ' SET '.implode(', ', $values)
177 177
             . $this->compileWhere($query);
178 178
     }
179 179
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
             if ($from['alias'] === null) {
436 436
                 $sql[$from['table']] = $this->quoteIdentifier($query, $from['table']);
437 437
             } else {
438
-                $sql[$from['alias']] = $this->quoteIdentifier($query, $from['table']) . ' ' . $this->quoteIdentifier($query, $from['alias']);
438
+                $sql[$from['alias']] = $this->quoteIdentifier($query, $from['table']).' '.$this->quoteIdentifier($query, $from['alias']);
439 439
             }
440 440
         }
441 441
 
@@ -460,12 +460,12 @@  discard block
 block discarded – undo
460 460
 
461 461
             if ($join['alias'] === null) {
462 462
                 $sql[$join['table']] = $join['type']
463
-                    . ' JOIN ' . $this->quoteIdentifier($query, $join['table'])
464
-                    . ' ON '   . $this->compileCompilableClauses($query, $join['on']);
463
+                    . ' JOIN '.$this->quoteIdentifier($query, $join['table'])
464
+                    . ' ON '.$this->compileCompilableClauses($query, $join['on']);
465 465
             } else {
466 466
                 $sql[$join['alias']] = $join['type']
467
-                    . ' JOIN ' . $this->quoteIdentifier($query, $join['table']).' '.$this->quoteIdentifier($query, $join['alias'])
468
-                    . ' ON '   . $this->compileCompilableClauses($query, $join['on']);
467
+                    . ' JOIN '.$this->quoteIdentifier($query, $join['table']).' '.$this->quoteIdentifier($query, $join['alias'])
468
+                    . ' ON '.$this->compileCompilableClauses($query, $join['on']);
469 469
             }
470 470
         }
471 471
 
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
                 if (is_array($value)) {
617 617
                     return $this->compileIntoExpression($query, $value, $column, 'REGEXP', $converted);
618 618
                 }
619
-                return $this->quoteIdentifier($query, $column).' REGEXP '.$this->compileExpressionValue($query, (string)$value, $converted ? false : null);
619
+                return $this->quoteIdentifier($query, $column).' REGEXP '.$this->compileExpressionValue($query, (string) $value, $converted ? false : null);
620 620
 
621 621
             // LIKE
622 622
             case ':like':
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
                 
690 690
             // Unsupported operator
691 691
             default:
692
-                throw new UnexpectedValueException("Unsupported operator '" . $operator . "' in WHERE clause");
692
+                throw new UnexpectedValueException("Unsupported operator '".$operator."' in WHERE clause");
693 693
         }
694 694
     }
695 695
 
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
         $sql = '('.$this->compileSelect($query).')';
752 752
         
753 753
         if ($alias) {
754
-            $sql = $sql . ' as ' . $this->quoteIdentifier($clause, $alias);
754
+            $sql = $sql.' as '.$this->quoteIdentifier($clause, $alias);
755 755
         }
756 756
         
757 757
         $this->addQueryBindings($clause, $query);
@@ -903,12 +903,12 @@  discard block
 block discarded – undo
903 903
         if ($lock !== null && !$query->statements['aggregate']) {
904 904
             // Lock for update
905 905
             if ($lock === LockMode::PESSIMISTIC_WRITE) {
906
-                return ' ' . $this->platform()->grammar()->getWriteLockSQL();
906
+                return ' '.$this->platform()->grammar()->getWriteLockSQL();
907 907
             }
908 908
 
909 909
             // Shared Lock: other process can read the row but not update it.
910 910
             if ($lock === LockMode::PESSIMISTIC_READ) {
911
-                return ' ' . $this->platform()->grammar()->getReadLockSQL();
911
+                return ' '.$this->platform()->grammar()->getReadLockSQL();
912 912
             }
913 913
         }
914 914
 
Please login to merge, or discard this patch.
src/Query/Factory/DefaultQueryFactory.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -94,16 +94,16 @@
 block discarded – undo
94 94
      */
95 95
     public function compiler($query)
96 96
     {
97
-         if (!isset($this->compilers[$query])) {
98
-             return $this->defaultCompiler;
99
-         }
97
+            if (!isset($this->compilers[$query])) {
98
+                return $this->defaultCompiler;
99
+            }
100 100
 
101
-         $compiler = $this->compilers[$query];
101
+            $compiler = $this->compilers[$query];
102 102
 
103
-         if (is_string($compiler)) {
104
-             return $this->compilers[$query] = new $compiler($this->connection);
105
-         }
103
+            if (is_string($compiler)) {
104
+                return $this->compilers[$query] = new $compiler($this->connection);
105
+            }
106 106
 
107
-         return $compiler;
107
+            return $compiler;
108 108
     }
109 109
 }
Please login to merge, or discard this patch.