Completed
Push — develop ( cebe30...fee52d )
by Marco
14s
created
tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php 2 patches
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
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
             $query->free();
66 66
         } catch (\Exception $e) {
67
-            $this->fail($e->getMessage() ."\n".$e->getTraceAsString());
67
+            $this->fail($e->getMessage()."\n".$e->getTraceAsString());
68 68
         }
69 69
 
70 70
         self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
@@ -1614,7 +1614,7 @@  discard block
 block discarded – undo
1614 1614
     public function testAliasDoesNotExceedPlatformDefinedLength()
1615 1615
     {
1616 1616
         $this->assertSqlGeneration(
1617
-            'SELECT m FROM ' . __NAMESPACE__ .  '\\DDC1384Model m',
1617
+            'SELECT m FROM '.__NAMESPACE__.'\\DDC1384Model m',
1618 1618
             'SELECT t0."aVeryLongIdentifierThatShouldBeShortenedByTheSQLWalker_fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" AS c0 FROM "DDC1384Model" t0'
1619 1619
         );
1620 1620
     }
@@ -1647,12 +1647,12 @@  discard block
 block discarded – undo
1647 1647
     public function testSelectWithArithmeticExpressionBeforeField()
1648 1648
     {
1649 1649
         $this->assertSqlGeneration(
1650
-            'SELECT - e.value AS value, e.id FROM ' . __NAMESPACE__ . '\DDC1474Entity e',
1650
+            'SELECT - e.value AS value, e.id FROM '.__NAMESPACE__.'\DDC1474Entity e',
1651 1651
             'SELECT -t0."value" AS c0, t0."id" AS c1 FROM "DDC1474Entity" t0'
1652 1652
         );
1653 1653
 
1654 1654
         $this->assertSqlGeneration(
1655
-            'SELECT e.id, + e.value AS value FROM ' . __NAMESPACE__ . '\DDC1474Entity e',
1655
+            'SELECT e.id, + e.value AS value FROM '.__NAMESPACE__.'\DDC1474Entity e',
1656 1656
             'SELECT t0."id" AS c0, +t0."value" AS c1 FROM "DDC1474Entity" t0'
1657 1657
         );
1658 1658
     }
@@ -2328,8 +2328,8 @@  discard block
 block discarded – undo
2328 2328
     public function testHavingRegressionUsingVariableWithMathOperatorsExpression($operator)
2329 2329
     {
2330 2330
         $this->assertSqlGeneration(
2331
-            'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 ' . $operator . ' countName > 0',
2332
-            'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 ' . $operator . ' c0 > 0'
2331
+            'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 '.$operator.' countName > 0',
2332
+            'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 '.$operator.' c0 > 0'
2333 2333
         );
2334 2334
     }
2335 2335
 
@@ -2351,7 +2351,7 @@  discard block
 block discarded – undo
2351 2351
      */
2352 2352
     public function getSql(SqlWalker $sqlWalker)
2353 2353
     {
2354
-        return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')';
2354
+        return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression).')';
2355 2355
     }
2356 2356
 
2357 2357
     /**
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2128,12 +2128,12 @@
 block discarded – undo
2128 2128
         $this->assertSqlGeneration(
2129 2129
             'SELECT u.id FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE CONCAT(u.name, u.status, \'s\') = ?1',
2130 2130
             'SELECT t0.[id] AS c0 FROM [cms_users] t0 WHERE (t0.[name] + t0.[status] + \'s\') = ?'
2131
-    	);
2131
+        );
2132 2132
 
2133 2133
         $this->assertSqlGeneration(
2134 2134
             'SELECT CONCAT(u.id, u.name, u.status) FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1',
2135 2135
             'SELECT (t0.[id] + t0.[name] + t0.[status]) AS c0 FROM [cms_users] t0 WHERE t0.[id] = ?'
2136
-    	);
2136
+        );
2137 2137
     }
2138 2138
 
2139 2139
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php 1 patch
Spacing   +9 added lines, -9 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
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $this->addToAssertionCount(1);
31 31
         } catch (QueryException $e) {
32 32
             if ($debug) {
33
-                echo $e->getTraceAsString() . PHP_EOL;
33
+                echo $e->getTraceAsString().PHP_EOL;
34 34
             }
35 35
 
36 36
             $this->fail($e->getMessage());
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
             $this->fail('No syntax errors were detected, when syntax errors were expected');
46 46
         } catch (QueryException $e) {
47 47
             if ($debug) {
48
-                echo $e->getMessage() . PHP_EOL;
49
-                echo $e->getTraceAsString() . PHP_EOL;
48
+                echo $e->getMessage().PHP_EOL;
49
+                echo $e->getTraceAsString().PHP_EOL;
50 50
             }
51 51
             $this->addToAssertionCount(1);
52 52
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             ['SELECT foo: FROM Doctrine\Tests\Models\CMS\CmsUser foo:'],
116 116
 
117 117
             /* Checks for invalid AbstractSchemaName */
118
-            ['SELECT u FROM UnknownClass u'],  // unknown
118
+            ['SELECT u FROM UnknownClass u'], // unknown
119 119
             ['SELECT u FROM Unknown\Class u'], // unknown with namespace
120 120
             ['SELECT u FROM \Unknown\Class u'], // unknown, leading backslash
121 121
             ['SELECT u FROM Unknown\\\\Class u'], // unknown, syntactically bogus (duplicate \\)
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
      */
589 589
     public function testDQLKeywordInJoinIsAllowed()
590 590
     {
591
-        self::assertValidDQL('SELECT u FROM ' . __NAMESPACE__ . '\DQLKeywordsModelUser u JOIN u.group g');
591
+        self::assertValidDQL('SELECT u FROM '.__NAMESPACE__.'\DQLKeywordsModelUser u JOIN u.group g');
592 592
     }
593 593
 
594 594
     /**
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
      */
597 597
     public function testDQLKeywordInConditionIsAllowed()
598 598
     {
599
-        self::assertValidDQL('SELECT g FROM ' . __NAMESPACE__ . '\DQLKeywordsModelGroup g WHERE g.from=0');
599
+        self::assertValidDQL('SELECT g FROM '.__NAMESPACE__.'\DQLKeywordsModelGroup g WHERE g.from=0');
600 600
     }
601 601
 
602 602
     /* The exception is currently thrown in the SQLWalker, not earlier.
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
      */
702 702
     public function testNewLiteralExpression()
703 703
     {
704
-        self::assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
704
+        self::assertValidDQL("SELECT new ".__NAMESPACE__."\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
705 705
     }
706 706
 
707 707
     /**
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
      */
710 710
     public function testNewLiteralWithSubselectExpression()
711 711
     {
712
-        self::assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
712
+        self::assertValidDQL("SELECT new ".__NAMESPACE__."\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
713 713
     }
714 714
 }
715 715
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.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\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.
tests/Doctrine/Tests/ORM/Query/FilterCollectionTest.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\Tests\ORM\Query;
6 6
 
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
     public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
89 89
     {
90 90
         // getParameter applies quoting automatically
91
-        return $targetTableAlias . '.id = ' . $this->getParameter('id');
91
+        return $targetTableAlias.'.id = '.$this->getParameter('id');
92 92
     }
93 93
 }
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.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\Tests\ORM\Persisters;
6 6
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $method = new \ReflectionMethod($this->persister, 'getSelectConditionSQL');
94 94
         $method->setAccessible(true);
95 95
 
96
-        $sql = $method->invoke($this->persister,  ['customInteger' => 1, 'child' => 1]);
96
+        $sql = $method->invoke($this->persister, ['customInteger' => 1, 'child' => 1]);
97 97
 
98 98
         self::assertEquals('t0."customInteger" = ABS(?) AND t0."child_id" = ?', $sql);
99 99
     }
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Persisters/BasicEntityPersisterCompositeTypeSqlTest.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\Persisters;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.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\Tests\ORM\Functional\SchemaTool;
6 6
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         parent::setUp();
17 17
 
18 18
         if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'postgresql') {
19
-            $this->markTestSkipped('The ' . __CLASS__ .' requires the use of postgresql.');
19
+            $this->markTestSkipped('The '.__CLASS__.' requires the use of postgresql.');
20 20
         }
21 21
     }
22 22
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/CompanySchemaTest.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\Tests\ORM\Functional\SchemaTool;
6 6
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function testDropPartSchemaWithForeignKeys()
60 60
     {
61
-        if (!$this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
61
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
62 62
             $this->markTestSkipped("Foreign Key test");
63 63
         }
64 64
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/DBAL483Test.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\Tests\ORM\Functional\SchemaTool;
6 6
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
         $updateSql = $this->schemaTool->getUpdateSchemaSql([$class]);
32 32
 
33
-        $updateSql = array_filter($updateSql, function ($sql) {
33
+        $updateSql = array_filter($updateSql, function($sql) {
34 34
             return strpos($sql, 'DBAL483') !== false;
35 35
         });
36 36
 
Please login to merge, or discard this patch.