Failed Conditions
Pull Request — master (#7155)
by Gabriel
11:34
created
tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersJoinTest.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\Tests\ORM\Query;
6 6
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
             self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
38 38
         } catch (\Exception $e) {
39
-            $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine());
39
+            $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine());
40 40
         }
41 41
     }
42 42
 
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $rangeVariableDecl       = $identificationVariableDecl->rangeVariableDeclaration;
78 78
         $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address');
79
-        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null);
79
+        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null);
80 80
         $join                    = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration);
81
-        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false);
81
+        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false);
82 82
 
83 83
         $identificationVariableDecl->joins[]                = $join;
84 84
         $selectStatement->selectClause->selectExpressions[] = $selectExpression;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class);
89 89
 
90 90
         $this->setQueryComponent(
91
-            $rangeVariableDecl->aliasIdentificationVariable . 'a',
91
+            $rangeVariableDecl->aliasIdentificationVariable.'a',
92 92
             [
93 93
                 'metadata'     => $addressMetadata,
94 94
                 'parent'       => $rangeVariableDecl->aliasIdentificationVariable,
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php 1 patch
Spacing   +8 added lines, -8 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\Query;
6 6
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
             self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
69 69
         } catch (\Exception $e) {
70
-            $this->fail($e->getMessage() . "\n" . $e->getTraceAsString());
70
+            $this->fail($e->getMessage()."\n".$e->getTraceAsString());
71 71
         }
72 72
     }
73 73
 
@@ -1622,7 +1622,7 @@  discard block
 block discarded – undo
1622 1622
     public function testAliasDoesNotExceedPlatformDefinedLength() : void
1623 1623
     {
1624 1624
         $this->assertSqlGeneration(
1625
-            'SELECT m FROM ' . __NAMESPACE__ . '\\DDC1384Model m',
1625
+            'SELECT m FROM '.__NAMESPACE__.'\\DDC1384Model m',
1626 1626
             'SELECT t0."aVeryLongIdentifierThatShouldBeShortenedByTheSQLWalker_fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" AS c0 FROM "DDC1384Model" t0'
1627 1627
         );
1628 1628
     }
@@ -1655,12 +1655,12 @@  discard block
 block discarded – undo
1655 1655
     public function testSelectWithArithmeticExpressionBeforeField() : void
1656 1656
     {
1657 1657
         $this->assertSqlGeneration(
1658
-            'SELECT - e.value AS value, e.id FROM ' . __NAMESPACE__ . '\DDC1474Entity e',
1658
+            'SELECT - e.value AS value, e.id FROM '.__NAMESPACE__.'\DDC1474Entity e',
1659 1659
             'SELECT -t0."value" AS c0, t0."id" AS c1 FROM "DDC1474Entity" t0'
1660 1660
         );
1661 1661
 
1662 1662
         $this->assertSqlGeneration(
1663
-            'SELECT e.id, + e.value AS value FROM ' . __NAMESPACE__ . '\DDC1474Entity e',
1663
+            'SELECT e.id, + e.value AS value FROM '.__NAMESPACE__.'\DDC1474Entity e',
1664 1664
             'SELECT t0."id" AS c0, +t0."value" AS c1 FROM "DDC1474Entity" t0'
1665 1665
         );
1666 1666
     }
@@ -2337,8 +2337,8 @@  discard block
 block discarded – undo
2337 2337
     public function testHavingRegressionUsingVariableWithMathOperatorsExpression($operator) : void
2338 2338
     {
2339 2339
         $this->assertSqlGeneration(
2340
-            'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 ' . $operator . ' countName > 0',
2341
-            'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 ' . $operator . ' c0 > 0'
2340
+            'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 '.$operator.' countName > 0',
2341
+            'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 '.$operator.' c0 > 0'
2342 2342
         );
2343 2343
     }
2344 2344
 
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
 
2358 2358
     public function getSql(SqlWalker $sqlWalker)
2359 2359
     {
2360
-        return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')';
2360
+        return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression).')';
2361 2361
     }
2362 2362
 
2363 2363
     public function parse(Parser $parser)
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Event/OnClassMetadataNotFoundEventArgsTest.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\Tests\ORM\Event;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.php 1 patch
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\Tests\ORM\Functional;
6 6
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
             self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
48 48
         } catch (\Exception $e) {
49
-            $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine());
49
+            $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine());
50 50
         }
51 51
     }
52 52
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             $condExpr = $whereClause->conditionalExpression;
145 145
 
146 146
             // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression
147
-            if (! ($condExpr instanceof Query\AST\ConditionalExpression)) {
147
+            if ( ! ($condExpr instanceof Query\AST\ConditionalExpression)) {
148 148
                 $condExpr = new Query\AST\ConditionalExpression([$condExpr]);
149 149
 
150 150
                 $whereClause->conditionalExpression = $condExpr;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 $singleTerm = $selectStatement->whereClause->conditionalExpression->conditionalTerms[0];
168 168
 
169 169
                 // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression
170
-                if (! ($singleTerm instanceof Query\AST\ConditionalTerm)) {
170
+                if ( ! ($singleTerm instanceof Query\AST\ConditionalTerm)) {
171 171
                     $singleTerm = new Query\AST\ConditionalTerm([$singleTerm]);
172 172
 
173 173
                     $selectStatement->whereClause->conditionalExpression->conditionalTerms[0] = $singleTerm;
@@ -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;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class);
218 218
 
219 219
         $this->setQueryComponent(
220
-            $rangeVariableDecl->aliasIdentificationVariable . 'a',
220
+            $rangeVariableDecl->aliasIdentificationVariable.'a',
221 221
             [
222 222
                 'metadata'     => $addressMetadata,
223 223
                 'parent'       => $rangeVariableDecl->aliasIdentificationVariable,
Please login to merge, or discard this patch.