Failed Conditions
Push — develop ( 67dede...5c2ff2 )
by Marco
17s
created
tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -119,6 +119,10 @@  discard block
 block discarded – undo
119 119
      */
120 120
     public $driverRides;
121 121
 
122
+    /**
123
+     * @param integer $id
124
+     * @param string $name
125
+     */
122 126
     public function __construct($id, $name)
123 127
     {
124 128
         $this->driverRides = new ArrayCollection();
@@ -181,6 +185,10 @@  discard block
 block discarded – undo
181 185
      */
182 186
     public $carRides;
183 187
 
188
+    /**
189
+     * @param string $brand
190
+     * @param string $model
191
+     */
184 192
     public function __construct($brand, $model)
185 193
     {
186 194
         $this->carRides = new ArrayCollection();
Please login to merge, or discard this 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\Tests\ORM\Functional\Ticket;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -38,6 +38,10 @@
 block discarded – undo
38 38
         return $query->getSql();
39 39
     }
40 40
 
41
+    /**
42
+     * @param string $dqlToBeTested
43
+     * @param string $sqlToBeConfirmed
44
+     */
41 45
     public function assertSqlGeneration($dqlToBeTested, $sqlToBeConfirmed, $treeWalkers = [], $outputWalker = null)
42 46
     {
43 47
         try {
Please login to merge, or discard this 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\Tests\ORM\Functional;
6 6
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         try {
46 46
             $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker);
47 47
         } catch (\Exception $e) {
48
-            $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine());
48
+            $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine());
49 49
         }
50 50
 
51 51
         self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
     {
206 206
         $rangeVariableDecl       = $identificationVariableDecl->rangeVariableDeclaration;
207 207
         $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address');
208
-        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null);
208
+        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null);
209 209
         $join                    = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration);
210
-        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false);
210
+        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false);
211 211
 
212 212
         $identificationVariableDecl->joins[]                = $join;
213 213
         $selectStatement->selectClause->selectExpressions[] = $selectExpression;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $userMetadata    = $entityManager->getClassMetadata(CmsUser::class);
217 217
         $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class);
218 218
 
219
-        $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable . 'a',
219
+        $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable.'a',
220 220
             [
221 221
                 'metadata'     => $addressMetadata,
222 222
                 'parent'       => $rangeVariableDecl->aliasIdentificationVariable,
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/CacheConfiguration.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function getCacheLogger()
75 75
     {
76
-         return $this->cacheLogger;
76
+            return $this->cacheLogger;
77 77
     }
78 78
 
79 79
     /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             );
116 116
         }
117 117
 
118
-         return $this->queryValidator;
118
+            return $this->queryValidator;
119 119
     }
120 120
 
121 121
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Cache;
7 7
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Parser.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
      * declarations (from ... x join ... y join ... z ...) appear in the query
414 414
      * as the hydration process relies on that order for proper operation.
415 415
      *
416
-     * @param AST\SelectStatement|AST\DeleteStatement|AST\UpdateStatement $AST
416
+     * @param AST\SelectStatement $AST
417 417
      *
418 418
      * @return void
419 419
      */
@@ -1617,7 +1617,7 @@  discard block
 block discarded – undo
1617 1617
      * accessible is "FROM", prohibiting an easy implementation without larger
1618 1618
      * changes.}
1619 1619
      *
1620
-     * @return \Doctrine\ORM\Query\AST\SubselectIdentificationVariableDeclaration |
1620
+     * @return AST\IdentificationVariableDeclaration |
1621 1621
      *         \Doctrine\ORM\Query\AST\IdentificationVariableDeclaration
1622 1622
      */
1623 1623
     public function SubselectIdentificationVariableDeclaration()
@@ -1755,7 +1755,7 @@  discard block
 block discarded – undo
1755 1755
     /**
1756 1756
      * JoinAssociationDeclaration ::= JoinAssociationPathExpression ["AS"] AliasIdentificationVariable [IndexBy]
1757 1757
      *
1758
-     * @return \Doctrine\ORM\Query\AST\JoinAssociationPathExpression
1758
+     * @return AST\JoinAssociationDeclaration
1759 1759
      */
1760 1760
     public function JoinAssociationDeclaration()
1761 1761
     {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 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
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
         $tokenStr = substr($dql, (int) $token['position'], $length);
472 472
 
473 473
         // Building informative message
474
-        $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;
474
+        $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message;
475 475
 
476 476
         throw QueryException::semanticalError(
477 477
             $message,
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
             // If the namespace is not given then assumes the first FROM entity namespace
622 622
             if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) {
623 623
                 $namespace  = substr($fromClassName, 0, strrpos($fromClassName, '\\'));
624
-                $fqcn       = $namespace . '\\' . $className;
624
+                $fqcn       = $namespace.'\\'.$className;
625 625
 
626 626
                 if (class_exists($fqcn)) {
627 627
                     $expression->className  = $fqcn;
@@ -670,13 +670,13 @@  discard block
 block discarded – undo
670 670
                 }
671 671
 
672 672
                 $this->semanticalError(
673
-                    "There is no mapped field named '$field' on class " . $class->getClassName() . ".", $deferredItem['token']
673
+                    "There is no mapped field named '$field' on class ".$class->getClassName().".", $deferredItem['token']
674 674
                 );
675 675
             }
676 676
 
677 677
             if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) {
678 678
                 $this->semanticalError(
679
-                    "The partial field selection of class " . $class->getClassName() . " must contain the identifier.",
679
+                    "The partial field selection of class ".$class->getClassName()." must contain the identifier.",
680 680
                     $deferredItem['token']
681 681
                 );
682 682
             }
@@ -745,9 +745,9 @@  discard block
 block discarded – undo
745 745
             $property = $class->getProperty($field);
746 746
 
747 747
             // Check if field or association exists
748
-            if (! $property) {
748
+            if ( ! $property) {
749 749
                 $this->semanticalError(
750
-                    'Class ' . $class->getClassName() . ' has no field or association named ' . $field,
750
+                    'Class '.$class->getClassName().' has no field or association named '.$field,
751 751
                     $deferredItem['token']
752 752
                 );
753 753
             }
@@ -786,8 +786,8 @@  discard block
 block discarded – undo
786 786
                 // Build the error message
787 787
                 $semanticalError  = 'Invalid PathExpression. ';
788 788
                 $semanticalError .= \count($expectedStringTypes) === 1
789
-                    ? 'Must be a ' . $expectedStringTypes[0] . '.'
790
-                    : implode(' or ', $expectedStringTypes) . ' expected.';
789
+                    ? 'Must be a '.$expectedStringTypes[0].'.'
790
+                    : implode(' or ', $expectedStringTypes).' expected.';
791 791
 
792 792
                 $this->semanticalError($semanticalError, $deferredItem['token']);
793 793
             }
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
 
957 957
             list($namespaceAlias, $simpleClassName) = explode(':', $this->lexer->token['value']);
958 958
 
959
-            $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
959
+            $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
960 960
         }
961 961
 
962 962
         return $schemaName;
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
 
1042 1042
         if ( ! isset($this->queryComponents[$identVariable])) {
1043 1043
             $this->semanticalError(
1044
-                'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.'
1044
+                'Identification Variable '.$identVariable.' used in join path expression but was not defined before.'
1045 1045
             );
1046 1046
         }
1047 1047
 
@@ -1054,8 +1054,8 @@  discard block
 block discarded – undo
1054 1054
         $qComp = $this->queryComponents[$identVariable];
1055 1055
         $class = $qComp['metadata'];
1056 1056
 
1057
-        if (! (($property = $class->getProperty($field)) !== null && $property instanceof AssociationMetadata)) {
1058
-            $this->semanticalError('Class ' . $class->getClassName() . ' has no association named ' . $field);
1057
+        if ( ! (($property = $class->getProperty($field)) !== null && $property instanceof AssociationMetadata)) {
1058
+            $this->semanticalError('Class '.$class->getClassName().' has no association named '.$field);
1059 1059
         }
1060 1060
 
1061 1061
         return new AST\JoinAssociationPathExpression($identVariable, $field);
@@ -2477,7 +2477,7 @@  discard block
 block discarded – undo
2477 2477
         // Peek beyond the matching closing parenthesis ')'
2478 2478
         $peek = $this->peekBeyondClosingParenthesis();
2479 2479
 
2480
-        if (in_array($peek['value'], ["=",  "<", "<=", "<>", ">", ">=", "!="]) ||
2480
+        if (in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) ||
2481 2481
             in_array($peek['type'], [Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS]) ||
2482 2482
             $this->isMathOperator($peek)) {
2483 2483
             $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
@@ -2582,7 +2582,7 @@  discard block
 block discarded – undo
2582 2582
             return $this->NullComparisonExpression();
2583 2583
         }
2584 2584
 
2585
-        if ($token['type'] === Lexer::T_IS  && $lookahead['type'] === Lexer::T_EMPTY) {
2585
+        if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) {
2586 2586
             return $this->EmptyCollectionComparisonExpression();
2587 2587
         }
2588 2588
 
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToOneSelfReferentialAssociationTest.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -161,8 +161,16 @@
 block discarded – undo
161 161
     private $other2;
162 162
 
163 163
     public function getId() {return $this->id;}
164
+
165
+    /**
166
+     * @param MultiSelfReference $other1
167
+     */
164 168
     public function setOther1($other1) {$this->other1 = $other1;}
165 169
     public function getOther1() {return $this->other1;}
170
+
171
+    /**
172
+     * @param MultiSelfReference $other2
173
+     */
166 174
     public function setOther2($other2) {$this->other2 = $other2;}
167 175
     public function getOther2() {return $this->other2;}
168 176
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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\Tests\ORM\Functional;
6 6
 
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
      */
162 162
     private $other2;
163 163
 
164
-    public function getId() {return $this->id;}
165
-    public function setOther1($other1) {$this->other1 = $other1;}
166
-    public function getOther1() {return $this->other1;}
167
-    public function setOther2($other2) {$this->other2 = $other2;}
168
-    public function getOther2() {return $this->other2;}
164
+    public function getId() {return $this->id; }
165
+    public function setOther1($other1) {$this->other1 = $other1; }
166
+    public function getOther1() {return $this->other1; }
167
+    public function setOther2($other2) {$this->other2 = $other2; }
168
+    public function getOther2() {return $this->other2; }
169 169
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2692Test.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
     public function testIsListenerCalledOnlyOnceOnPreFlush()
33 33
     {
34 34
         $listener = $this->getMockBuilder(DDC2692Listener::class)
35
-                         ->setMethods(['preFlush'])
36
-                         ->getMock();
35
+                            ->setMethods(['preFlush'])
36
+                            ->getMock();
37 37
 
38 38
         $listener->expects($this->once())->method('preFlush');
39 39
 
Please login to merge, or discard this 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\Tests\ORM\Functional\Ticket;
6 6
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                 $this->em->getClassMetadata(DDC2692Foo::class),
27 27
                 ]
28 28
             );
29
-        } catch(\Exception $e) {
29
+        } catch (\Exception $e) {
30 30
             return;
31 31
         }
32 32
         $this->em->clear();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2359Test.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
                                 ->getMock();
33 33
 
34 34
         $configuration = $this->getMockBuilder(Configuration::class)
35
-                              ->setMethods(['getMetadataDriverImpl'])
36
-                              ->getMock();
35
+                                ->setMethods(['getMetadataDriverImpl'])
36
+                                ->getMock();
37 37
 
38 38
         $connection = $this->createMock(Connection::class);
39 39
 
Please login to merge, or discard this 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\Tests\ORM\Functional\Ticket;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3123Test.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
         $uow->scheduleExtraUpdate($user, ['name' => 'changed name']);
30 30
 
31 31
         $listener = $this->getMockBuilder(\stdClass::class)
32
-                         ->setMethods([Events::postFlush])
33
-                         ->getMock();
32
+                            ->setMethods([Events::postFlush])
33
+                            ->getMock();
34 34
 
35 35
         $listener
36 36
             ->expects($this->once())
Please login to merge, or discard this 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\Tests\ORM\Functional\Ticket;
6 6
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $listener
38 38
             ->expects($this->once())
39 39
             ->method(Events::postFlush)
40
-            ->will($this->returnCallback(function () use ($uow, $test) {
40
+            ->will($this->returnCallback(function() use ($uow, $test) {
41 41
                 $test->assertAttributeEmpty('extraUpdates', $uow, 'ExtraUpdates are reset before postFlush');
42 42
             }));
43 43
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -136,24 +136,24 @@
 block discarded – undo
136 136
                     ->will($this->returnValue( 10 ));
137 137
 
138 138
         $parserResultMock = $this->getMockBuilder(ParserResult::class)
139
-                                 ->setMethods(['getSqlExecutor'])
140
-                                 ->getMock();
139
+                                    ->setMethods(['getSqlExecutor'])
140
+                                    ->getMock();
141 141
         $parserResultMock->expects($this->once())
142
-                         ->method('getSqlExecutor')
143
-                         ->will($this->returnValue($sqlExecMock));
142
+                            ->method('getSqlExecutor')
143
+                            ->will($this->returnValue($sqlExecMock));
144 144
 
145 145
         $cache = $this->getMockBuilder(CacheProvider::class)
146
-                      ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats'])
147
-                      ->getMock();
146
+                        ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats'])
147
+                        ->getMock();
148 148
 
149 149
         $cache->expects($this->at(0))->method('doFetch')->will($this->returnValue(1));
150 150
         $cache->expects($this->at(1))
151
-              ->method('doFetch')
152
-              ->with($this->isType('string'))
153
-              ->will($this->returnValue($parserResultMock));
151
+                ->method('doFetch')
152
+                ->with($this->isType('string'))
153
+                ->will($this->returnValue($parserResultMock));
154 154
 
155 155
         $cache->expects($this->never())
156
-              ->method('doSave');
156
+                ->method('doSave');
157 157
 
158 158
         $query->setQueryCacheDriver($cache);
159 159
 
Please login to merge, or discard this 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\Tests\ORM\Functional;
6 6
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         $sqlExecMock->expects($this->once())
137 137
                     ->method('execute')
138
-                    ->will($this->returnValue( 10 ));
138
+                    ->will($this->returnValue(10));
139 139
 
140 140
         $parserResultMock = $this->getMockBuilder(ParserResult::class)
141 141
                                  ->setMethods(['getSqlExecutor'])
Please login to merge, or discard this patch.