Completed
Pull Request — master (#950)
by Antoine
03:36
created
src/Bridge/Doctrine/Orm/Extension/FilterEagerLoadingExtension.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -11,12 +11,9 @@
 block discarded – undo
11 11
 
12 12
 namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Extension;
13 13
 
14
-use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryJoinParser;
15 14
 use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
16 15
 use ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface;
17
-use Doctrine\Common\Persistence\ManagerRegistry;
18 16
 use Doctrine\ORM\Mapping\ClassMetadataInfo;
19
-use Doctrine\ORM\Query\Expr\Join;
20 17
 use Doctrine\ORM\QueryBuilder;
21 18
 
22 19
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
                 //Find where parts that belong to the sub query
83 83
                 $qbWhereParts = [];
84
-                foreach($whereParts as $key => $where) {
84
+                foreach ($whereParts as $key => $where) {
85 85
                     if (false === strpos($where, $joinAlias)) {
86 86
                         continue;
87 87
                     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
         //It should be altered, create the WHERE clause again
115 115
         $queryBuilder->resetDQLPart('where');
116
-        foreach($queryBuilderClone->getDQLPart('where')->getParts() as $wherePart) {
116
+        foreach ($queryBuilderClone->getDQLPart('where')->getParts() as $wherePart) {
117 117
             $queryBuilder->add('where', $wherePart);
118 118
         }
119 119
     }
Please login to merge, or discard this patch.