Failed Conditions
Push — develop ( 856053...a7d1bd )
by Guilherme
61:28
created
lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Persisters\Entity;
6 6
 
@@ -59,6 +59,6 @@  discard block
 block discarded – undo
59 59
             $columnType
60 60
         );
61 61
 
62
-        return $columnType->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
62
+        return $columnType->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
63 63
     }
64 64
 }
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 
5 5
 namespace Doctrine\ORM\Persisters\Entity;
6 6
 
7
-use Doctrine\ORM\Mapping\ClassMetadata;
8
-use Doctrine\DBAL\Types\Type;
9 7
 use Doctrine\ORM\Mapping\JoinColumnMetadata;
10 8
 
11 9
 /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Persisters;
6 6
 
@@ -82,15 +82,15 @@  discard block
 block discarded – undo
82 82
             $expressionList[] = $this->dispatch($child);
83 83
         }
84 84
 
85
-        switch($expr->getType()) {
85
+        switch ($expr->getType()) {
86 86
             case CompositeExpression::TYPE_AND:
87
-                return '(' . implode(' AND ', $expressionList) . ')';
87
+                return '('.implode(' AND ', $expressionList).')';
88 88
 
89 89
             case CompositeExpression::TYPE_OR:
90
-                return '(' . implode(' OR ', $expressionList) . ')';
90
+                return '('.implode(' OR ', $expressionList).')';
91 91
 
92 92
             default:
93
-                throw new \RuntimeException("Unknown composite " . $expr->getType());
93
+                throw new \RuntimeException("Unknown composite ".$expr->getType());
94 94
         }
95 95
     }
96 96
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Utility/IdentifierFlattener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Utility;
6 6
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 //     ? $this->unitOfWork->getEntityIdentifier($id[$field])
75 75
                 //     : $targetClassPersister->getIdentifier($id[$field])
76 76
                 // ;
77
-                $identifiers          = $targetClassPersister->getIdentifier($id[$field]);
77
+                $identifiers = $targetClassPersister->getIdentifier($id[$field]);
78 78
 
79 79
                 $associatedId = $this->flattenIdentifier($targetClassMetadata, $identifiers);
80 80
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/PersistentCollection.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM;
6 6
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
      */
397 397
     public function containsKey($key)
398 398
     {
399
-        if (! $this->initialized &&
399
+        if ( ! $this->initialized &&
400 400
             $this->association !== null &&
401 401
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY &&
402 402
             $this->association->getIndexedBy()) {
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
      */
414 414
     public function contains($element)
415 415
     {
416
-        if (! $this->initialized &&
416
+        if ( ! $this->initialized &&
417 417
             $this->association !== null &&
418 418
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
419 419
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
@@ -429,11 +429,11 @@  discard block
 block discarded – undo
429 429
      */
430 430
     public function get($key)
431 431
     {
432
-        if (! $this->initialized &&
432
+        if ( ! $this->initialized &&
433 433
             $this->association !== null &&
434 434
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY &&
435 435
             $this->association->getIndexedBy()) {
436
-            if (!$this->typeClass->isIdentifierComposite() && $this->typeClass->isIdentifier($this->association->getIndexedBy())) {
436
+            if ( ! $this->typeClass->isIdentifierComposite() && $this->typeClass->isIdentifier($this->association->getIndexedBy())) {
437 437
                 return $this->em->find($this->typeClass->getClassName(), $key);
438 438
             }
439 439
 
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
      */
449 449
     public function count()
450 450
     {
451
-        if (! $this->initialized &&
451
+        if ( ! $this->initialized &&
452 452
             $this->association !== null &&
453 453
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
454 454
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
      */
603 603
     public function slice($offset, $length = null)
604 604
     {
605
-        if (! $this->initialized &&
605
+        if ( ! $this->initialized &&
606 606
             ! $this->isDirty &&
607 607
             $this->association !== null &&
608 608
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * INTERNAL:
170 170
      * Sets a keyed element in the collection during hydration.
171 171
      *
172
-     * @param mixed $key     The key to set.
172
+     * @param integer $key     The key to set.
173 173
      * @param mixed $element The element to set.
174 174
      *
175 175
      * @return void
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
      * Internal note: Tried to implement Serializable first but that did not work well
584 584
      *                with circular references. This solution seems simpler and works well.
585 585
      *
586
-     * @return array
586
+     * @return string[]
587 587
      */
588 588
     public function __sleep()
589 589
     {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/QueryException.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query;
6 6
 use Doctrine\ORM\Mapping\AssociationMetadata;
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public static function syntaxError($message, $previous = null)
39 39
     {
40
-        return new self('[Syntax Error] ' . $message, 0, $previous);
40
+        return new self('[Syntax Error] '.$message, 0, $previous);
41 41
     }
42 42
 
43 43
     /**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public static function semanticalError($message, $previous = null)
50 50
     {
51
-        return new self('[Semantical Error] ' . $message, 0, $previous);
51
+        return new self('[Semantical Error] '.$message, 0, $previous);
52 52
     }
53 53
 
54 54
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public static function invalidParameterType($expected, $received)
69 69
     {
70
-        return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.');
70
+        return new self('Invalid parameter type, '.$received.' given, but '.$expected.' expected.');
71 71
     }
72 72
 
73 73
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public static function invalidParameterPosition($pos)
79 79
     {
80
-        return new self('Invalid parameter position: ' . $pos);
80
+        return new self('Invalid parameter position: '.$pos);
81 81
     }
82 82
 
83 83
     /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public static function tooManyParameters($expected, $received)
90 90
     {
91
-        return new self('Too many parameters: the query defines ' . $expected . ' parameters and you bound ' . $received);
91
+        return new self('Too many parameters: the query defines '.$expected.' parameters and you bound '.$received);
92 92
     }
93 93
 
94 94
     /**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public static function tooFewParameters($expected, $received)
101 101
     {
102
-        return new self('Too few parameters: the query defines ' . $expected . ' parameters but you only bound ' . $received);
102
+        return new self('Too few parameters: the query defines '.$expected.' parameters but you only bound '.$received);
103 103
     }
104 104
 
105 105
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     public static function invalidPathExpression($pathExpr)
139 139
     {
140 140
         return new self(
141
-            "Invalid PathExpression '" . $pathExpr->identificationVariable . "." . $pathExpr->field . "'."
141
+            "Invalid PathExpression '".$pathExpr->identificationVariable.".".$pathExpr->field."'."
142 142
         );
143 143
     }
144 144
 
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
     public static function partialObjectsAreDangerous()
172 172
     {
173 173
         return new self(
174
-            "Loading partial objects is dangerous. Fetch full objects or consider " .
175
-            "using a different fetch mode. If you really want partial objects, " .
174
+            "Loading partial objects is dangerous. Fetch full objects or consider ".
175
+            "using a different fetch mode. If you really want partial objects, ".
176 176
             "set the doctrine.forcePartialLoad query hint to TRUE."
177 177
         );
178 178
     }
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
     public static function associationPathInverseSideNotSupported(PathExpression $pathExpr)
200 200
     {
201 201
         return new self(
202
-            'A single-valued association path expression to an inverse side is not supported in DQL queries. ' .
203
-            'Instead of "' . $pathExpr->identificationVariable . '.' . $pathExpr->field . '" use an explicit join.'
202
+            'A single-valued association path expression to an inverse side is not supported in DQL queries. '.
203
+            'Instead of "'.$pathExpr->identificationVariable.'.'.$pathExpr->field.'" use an explicit join.'
204 204
         );
205 205
     }
206 206
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      */
241 241
     public static function instanceOfUnrelatedClass($className, $rootClass)
242 242
     {
243
-        return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " .
243
+        return new self("Cannot check if a child of '".$rootClass."' is instanceof '".$className."', ".
244 244
             "inheritance hierarchy does not exists between these two classes.");
245 245
     }
246 246
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     public static function invalidQueryComponent($dqlAlias)
253 253
     {
254 254
         return new self(
255
-            "Invalid query component given for DQL alias '" . $dqlAlias . "', ".
255
+            "Invalid query component given for DQL alias '".$dqlAlias."', ".
256 256
             "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys."
257 257
         );
258 258
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Printer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query;
6 6
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function startProduction($name)
52 52
     {
53
-        $this->println('(' . $name);
53
+        $this->println('('.$name);
54 54
         $this->indent++;
55 55
     }
56 56
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/FilterCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query;
6 6
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * A filter object is in CLEAN state when it has no changed parameters.
20 20
      */
21
-    const FILTERS_STATE_CLEAN  = 1;
21
+    const FILTERS_STATE_CLEAN = 1;
22 22
 
23 23
     /**
24 24
      * A filter object is in DIRTY state when it has changed parameters.
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public function enable($name)
90 90
     {
91 91
         if ( ! $this->has($name)) {
92
-            throw new \InvalidArgumentException("Filter '" . $name . "' does not exist.");
92
+            throw new \InvalidArgumentException("Filter '".$name."' does not exist.");
93 93
         }
94 94
 
95 95
         if ( ! $this->isEnabled($name)) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     public function getFilter($name)
142 142
     {
143 143
         if ( ! $this->isEnabled($name)) {
144
-            throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled.");
144
+            throw new \InvalidArgumentException("Filter '".$name."' is not enabled.");
145 145
         }
146 146
 
147 147
         return $this->enabledFilters[$name];
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $filterHash = '';
195 195
 
196 196
         foreach ($this->enabledFilters as $name => $filter) {
197
-            $filterHash .= $name . $filter;
197
+            $filterHash .= $name.$filter;
198 198
         }
199 199
 
200 200
         return $filterHash;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Filter/SQLFilter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query\Filter;
6 6
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
      */
86 86
     final public function getParameter($name)
87 87
     {
88
-        if (!isset($this->parameters[$name])) {
89
-            throw new \InvalidArgumentException("Parameter '" . $name . "' does not exist.");
88
+        if ( ! isset($this->parameters[$name])) {
89
+            throw new \InvalidArgumentException("Parameter '".$name."' does not exist.");
90 90
         }
91 91
 
92 92
         return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     final public function hasParameter($name)
103 103
     {
104
-        if (!isset($this->parameters[$name])) {
104
+        if ( ! isset($this->parameters[$name])) {
105 105
             return false;
106 106
         }
107 107
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/TreeWalkerChainIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Query;
6 6
 
Please login to merge, or discard this patch.