Passed
Pull Request — 2.8.x (#8073)
by
unknown
06:47 queued 12s
created
lib/Doctrine/ORM/Tools/Pagination/RemoveUselessLeftJoinsWalker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
         $from     = $AST->fromClause->identificationVariableDeclarations;
27 27
         $fromRoot = reset($from);
28 28
 
29
-        if (! isset($AST->whereClause) || ! isset($AST->whereClause->conditionalExpression) || ! isset($AST->whereClause->conditionalExpression->simpleConditionalExpression)) {
29
+        if ( ! isset($AST->whereClause) || ! isset($AST->whereClause->conditionalExpression) || ! isset($AST->whereClause->conditionalExpression->simpleConditionalExpression)) {
30 30
             return;
31 31
         }
32 32
 
33 33
         $expr = $AST->whereClause->conditionalExpression->simpleConditionalExpression;
34 34
 
35
-        if (! isset($expr->subselect)) {
35
+        if ( ! isset($expr->subselect)) {
36 36
             return;
37 37
         }
38 38
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
     private function filterJoins($joins, $toRemove)
81 81
     {
82
-        return array_filter($joins, static function (Query\AST\Join $join) use ($toRemove) {
82
+        return array_filter($joins, static function(Query\AST\Join $join) use ($toRemove) {
83 83
             return ! in_array($join, $toRemove);
84 84
         });
85 85
     }
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Tools/Pagination/RemoveUselessLeftJoinWalkerTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 {
15 15
     public function testUselessLeftJoinsAreRemoved()
16 16
     {
17
-        $dql        = <<<DQL
17
+        $dql = <<<DQL
18 18
 SELECT p, c, a FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p 
19 19
 LEFT JOIN p.category c 
20 20
 LEFT JOIN p.author a
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function testOrderByLeftJoinsAreKept()
37 37
     {
38
-        $dql        = <<<DQL
38
+        $dql = <<<DQL
39 39
 SELECT p, c, a FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p 
40 40
 LEFT JOIN p.category c 
41 41
 LEFT JOIN p.author a
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function testWhereLeftJoinsAreKept()
58 58
     {
59
-        $dql        = <<<DQL
59
+        $dql = <<<DQL
60 60
 SELECT p, c, a FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p 
61 61
 LEFT JOIN p.category c 
62 62
 LEFT JOIN p.author a
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function testMultipleWhereLeftJoinsAreKept()
79 79
     {
80
-        $dql        = <<<DQL
80
+        $dql = <<<DQL
81 81
 SELECT p, c, a FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p 
82 82
 LEFT JOIN p.category c 
83 83
 LEFT JOIN p.author a
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
     public function testHavingLeftJoinsAreKept()
100 100
     {
101
-        $dql        = <<<DQL
101
+        $dql = <<<DQL
102 102
 SELECT p, c, a FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p 
103 103
 LEFT JOIN p.category c 
104 104
 LEFT JOIN p.author a
Please login to merge, or discard this patch.