Failed Conditions
Pull Request — master (#6820)
by
unknown
18:34
created
tests/Doctrine/Tests/ORM/Mapping/ReflectionEmbeddedPropertyTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Doctrine\Instantiator\Instantiator;
6 6
 use Doctrine\ORM\Mapping\ReflectionEmbeddedProperty;
7 7
 use Doctrine\Tests\Models\Generic\BooleanModel;
8
-use Doctrine\Tests\Models\Mapping\Entity;
9 8
 use Doctrine\Tests\Models\Reflection\AbstractEmbeddable;
10 9
 use Doctrine\Tests\Models\Reflection\ArrayObjectExtendingClass;
11 10
 use Doctrine\Tests\Models\Reflection\ConcreteEmbeddable;
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Doctrine\DBAL\Types\Type as DBALType;
8 8
 use Doctrine\ORM\Persisters\Entity\BasicEntityPersister;
9 9
 use Doctrine\Tests\Models\CustomType\CustomTypeChild;
10
-use Doctrine\Tests\Models\CustomType\CustomTypeFriend;
11 10
 use Doctrine\Tests\Models\CustomType\CustomTypeParent;
12 11
 use Doctrine\Tests\Models\Generic\NonAlphaColumnsEntity;
13 12
 use Doctrine\Tests\OrmTestCase;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         $method = new \ReflectionMethod($this->_persister, 'getSelectConditionSQL');
85 85
         $method->setAccessible(true);
86 86
 
87
-        $sql = $method->invoke($this->_persister,  ['customInteger' => 1, 'child' => 1]);
87
+        $sql = $method->invoke($this->_persister, ['customInteger' => 1, 'child' => 1]);
88 88
 
89 89
         $this->assertEquals('t0.customInteger = ABS(?) AND t0.child_id = ?', $sql);
90 90
     }
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         try {
44 44
             $this->assertEquals($sqlToBeConfirmed, $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker));
45 45
         } catch (\Exception $e) {
46
-            $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine());
46
+            $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine());
47 47
         }
48 48
     }
49 49
 
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $rangeVariableDecl       = $identificationVariableDecl->rangeVariableDeclaration;
203 203
         $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address');
204
-        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null);
204
+        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null);
205 205
         $join                    = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration);
206
-        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false);
206
+        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false);
207 207
 
208 208
         $identificationVariableDecl->joins[]                = $join;
209 209
         $selectStatement->selectClause->selectExpressions[] = $selectExpression;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $userMetadata    = $entityManager->getClassMetadata(CmsUser::class);
213 213
         $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class);
214 214
 
215
-        $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable . 'a',
215
+        $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable.'a',
216 216
             [
217 217
                 'metadata'     => $addressMetadata,
218 218
                 'parent'       => $rangeVariableDecl->aliasIdentificationVariable,
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -43,6 +43,10 @@
 block discarded – undo
43 43
         $this->_em = $this->_getTestEntityManager();
44 44
     }
45 45
 
46
+    /**
47
+     * @param string $dqlToBeTested
48
+     * @param string $sqlToBeConfirmed
49
+     */
46 50
     public function assertSqlGeneration($dqlToBeTested, $sqlToBeConfirmed)
47 51
     {
48 52
         try {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/QueryBuilderTest.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@
 block discarded – undo
35 35
         $this->_em = $this->_getTestEntityManager();
36 36
     }
37 37
 
38
+    /**
39
+     * @param string $expectedDql
40
+     */
38 41
     protected function assertValidQueryBuilder(QueryBuilder $qb, $expectedDql)
39 42
     {
40 43
         $dql = $qb->getDQL();
Please login to merge, or discard this patch.
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -272,12 +272,12 @@  discard block
 block discarded – undo
272 272
     {
273 273
         $qb = $this->_em->createQueryBuilder();
274 274
         $qb->select('u')
275
-           ->from(CmsUser::class, 'u')
276
-           ->where('u.id = :uid')
277
-           ->orWhere('u.id = :uid2')
278
-           ->andWhere('u.id = :uid3')
279
-           ->orWhere('u.name = :name1', 'u.name = :name2')
280
-           ->andWhere('u.name <> :noname');
275
+            ->from(CmsUser::class, 'u')
276
+            ->where('u.id = :uid')
277
+            ->orWhere('u.id = :uid2')
278
+            ->andWhere('u.id = :uid3')
279
+            ->orWhere('u.name = :name1', 'u.name = :name2')
280
+            ->andWhere('u.name <> :noname');
281 281
 
282 282
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE (((u.id = :uid OR u.id = :uid2) AND u.id = :uid3) OR u.name = :name1 OR u.name = :name2) AND u.name <> :noname');
283 283
     }
@@ -286,9 +286,9 @@  discard block
 block discarded – undo
286 286
     {
287 287
         $qb = $this->_em->createQueryBuilder();
288 288
         $qb->select('u')
289
-           ->from(CmsUser::class, 'u')
290
-           ->where('u.id = :uid')
291
-           ->andWhere($qb->expr()->in('u.id', [1, 2, 3]));
289
+            ->from(CmsUser::class, 'u')
290
+            ->where('u.id = :uid')
291
+            ->andWhere($qb->expr()->in('u.id', [1, 2, 3]));
292 292
 
293 293
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid AND u.id IN(1, 2, 3)');
294 294
     }
@@ -297,9 +297,9 @@  discard block
 block discarded – undo
297 297
     {
298 298
         $qb = $this->_em->createQueryBuilder();
299 299
         $qb->select('u')
300
-           ->from(CmsUser::class, 'u')
301
-           ->where('u.id = :uid')
302
-           ->orWhere($qb->expr()->in('u.id', [1, 2, 3]));
300
+            ->from(CmsUser::class, 'u')
301
+            ->where('u.id = :uid')
302
+            ->orWhere($qb->expr()->in('u.id', [1, 2, 3]));
303 303
 
304 304
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid OR u.id IN(1, 2, 3)');
305 305
     }
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
     {
309 309
         $qb = $this->_em->createQueryBuilder();
310 310
         $qb->select('u')
311
-           ->from(CmsUser::class, 'u')
312
-           ->where('u.id = :uid')
313
-           ->andWhere($qb->expr()->notIn('u.id', [1, 2, 3]));
311
+            ->from(CmsUser::class, 'u')
312
+            ->where('u.id = :uid')
313
+            ->andWhere($qb->expr()->notIn('u.id', [1, 2, 3]));
314 314
 
315 315
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid AND u.id NOT IN(1, 2, 3)');
316 316
     }
@@ -319,9 +319,9 @@  discard block
 block discarded – undo
319 319
     {
320 320
         $qb = $this->_em->createQueryBuilder();
321 321
         $qb->select('u')
322
-           ->from(CmsUser::class, 'u')
323
-           ->where('u.id = :uid')
324
-           ->orWhere($qb->expr()->notIn('u.id', [1, 2, 3]));
322
+            ->from(CmsUser::class, 'u')
323
+            ->where('u.id = :uid')
324
+            ->orWhere($qb->expr()->notIn('u.id', [1, 2, 3]));
325 325
 
326 326
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid OR u.id NOT IN(1, 2, 3)');
327 327
     }
@@ -617,8 +617,8 @@  discard block
 block discarded – undo
617 617
     {
618 618
         $qb = $this->_em->createQueryBuilder();
619 619
         $qb->select('u')
620
-           ->from(CmsUser::class, 'u')
621
-           ->where($qb->expr()->orX('u.username = :username', 'u.username = :username2'));
620
+            ->from(CmsUser::class, 'u')
621
+            ->where($qb->expr()->orX('u.username = :username', 'u.username = :username2'));
622 622
 
623 623
         $parameters = new ArrayCollection();
624 624
         $parameters->add(new Parameter('username', 'jwage'));
@@ -634,8 +634,8 @@  discard block
 block discarded – undo
634 634
     {
635 635
         $qb = $this->_em->createQueryBuilder();
636 636
         $qb->select('u')
637
-           ->from(CmsUser::class, 'u')
638
-           ->where('u.id = :id');
637
+            ->from(CmsUser::class, 'u')
638
+            ->where('u.id = :id');
639 639
 
640 640
         $parameters = new ArrayCollection();
641 641
         $parameters->add(new Parameter('id', 1));
@@ -684,8 +684,8 @@  discard block
 block discarded – undo
684 684
     {
685 685
         $qb = $this->_em->createQueryBuilder();
686 686
         $qb->select('u')
687
-           ->from(CmsUser::class, 'u')
688
-           ->orWhere('u.id = :uid', $qb->expr()->eq('u.id', ':uid2'));
687
+            ->from(CmsUser::class, 'u')
688
+            ->orWhere('u.id = :uid', $qb->expr()->eq('u.id', ':uid2'));
689 689
 
690 690
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid OR u.id = :uid2');
691 691
     }
@@ -698,8 +698,8 @@  discard block
 block discarded – undo
698 698
         $orExpr->add($qb->expr()->in('u.id', [1]));
699 699
 
700 700
         $qb->select('u')
701
-           ->from(CmsUser::class, 'u')
702
-           ->where($orExpr);
701
+            ->from(CmsUser::class, 'u')
702
+            ->where($orExpr);
703 703
 
704 704
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid3 OR u.id IN(1)');
705 705
     }
@@ -708,8 +708,8 @@  discard block
 block discarded – undo
708 708
     {
709 709
         $qb = $this->_em->createQueryBuilder();
710 710
         $qb->select('u')
711
-           ->from(CmsUser::class, 'u')
712
-           ->where($qb->expr()->in('u.name', ['one', 'two', 'three']));
711
+            ->from(CmsUser::class, 'u')
712
+            ->where($qb->expr()->in('u.name', ['one', 'two', 'three']));
713 713
 
714 714
         $this->assertValidQueryBuilder($qb, "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name IN('one', 'two', 'three')");
715 715
 
@@ -723,8 +723,8 @@  discard block
 block discarded – undo
723 723
         $qb = $this->_em->createQueryBuilder();
724 724
         $expr = $this->_em->getExpressionBuilder();
725 725
         $qb->select('u')
726
-           ->from(CmsUser::class, 'u')
727
-           ->where($expr->in('u.name', [$expr->literal('one'), $expr->literal('two'), $expr->literal('three')]));
726
+            ->from(CmsUser::class, 'u')
727
+            ->where($expr->in('u.name', [$expr->literal('one'), $expr->literal('two'), $expr->literal('three')]));
728 728
 
729 729
         $this->assertValidQueryBuilder($qb, "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name IN('one', 'two', 'three')");
730 730
 
@@ -742,8 +742,8 @@  discard block
 block discarded – undo
742 742
 
743 743
         $qb = $this->_em->createQueryBuilder();
744 744
         $qb->select('u')
745
-           ->from(CmsUser::class, 'u')
746
-           ->where($orExpr);
745
+            ->from(CmsUser::class, 'u')
746
+            ->where($orExpr);
747 747
 
748 748
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid3 OR NOT(u.id IN(1))');
749 749
     }
@@ -754,8 +754,8 @@  discard block
 block discarded – undo
754 754
         $expr = $this->_em->getExpressionBuilder();
755 755
 
756 756
         $qb->select('u')
757
-           ->from(CmsUser::class, 'u')
758
-           ->where($expr->gt('u.id', $expr->all('select a.id from Doctrine\Tests\Models\CMS\CmsArticle a')));
757
+            ->from(CmsUser::class, 'u')
758
+            ->where($expr->gt('u.id', $expr->all('select a.id from Doctrine\Tests\Models\CMS\CmsArticle a')));
759 759
 
760 760
         $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id > ALL(select a.id from Doctrine\Tests\Models\CMS\CmsArticle a)');
761 761
 
@@ -1121,9 +1121,9 @@  discard block
 block discarded – undo
1121 1121
     public function testRebuildsFromParts()
1122 1122
     {
1123 1123
         $qb = $this->_em->createQueryBuilder()
1124
-          ->select('u')
1125
-          ->from(CmsUser::class, 'u')
1126
-          ->join('u.article', 'a');
1124
+            ->select('u')
1125
+            ->from(CmsUser::class, 'u')
1126
+            ->join('u.article', 'a');
1127 1127
 
1128 1128
         $dqlParts = $qb->getDQLParts();
1129 1129
         $dql = $qb->getDQL();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         $qb = $this->_em->createQueryBuilder();
548 548
         $qb->select('u')
549 549
             ->from(CmsUser::class, 'u')
550
-            ->join('u.article','a');
550
+            ->join('u.article', 'a');
551 551
 
552 552
         $criteria = new Criteria();
553 553
         $criteria->orderBy(['a.field' => Criteria::DESC]);
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
             ->from(CmsUser::class, 'u')
825 825
             ->where('u.username = ?1')->orderBy('u.username');
826 826
 
827
-        $this->assertEquals('u.username = ?1', (string)$qb->getDQLPart('where'));
827
+        $this->assertEquals('u.username = ?1', (string) $qb->getDQLPart('where'));
828 828
         $this->assertEquals(1, count($qb->getDQLPart('orderBy')));
829 829
 
830 830
         $qb->resetDQLPart('where')->resetDQLPart('orderBy');
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
     {
889 889
         $qb = $this->_em->createQueryBuilder();
890 890
         $qb->select('alias1')->from(CmsUser::class, 'alias1');
891
-        $qb->join('alias1.articles','alias2');
891
+        $qb->join('alias1.articles', 'alias2');
892 892
 
893 893
         $criteria = new Criteria();
894 894
         $criteria->where($criteria->expr()->eq('field', 'value1'));
@@ -908,7 +908,7 @@  discard block
 block discarded – undo
908 908
     {
909 909
         $qb = $this->_em->createQueryBuilder();
910 910
         $qb->select('alias1')->from(CmsUser::class, 'alias1');
911
-        $qb->join('alias1.articles','alias2');
911
+        $qb->join('alias1.articles', 'alias2');
912 912
 
913 913
         $criteria = new Criteria();
914 914
         $criteria->where($criteria->expr()->eq('alias1.field', 'value1'));
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
     {
929 929
         $qb = $this->_em->createQueryBuilder();
930 930
         $qb->select('alias1')->from(CmsUser::class, 'alias1');
931
-        $qb->join('alias1.articles','alias2');
931
+        $qb->join('alias1.articles', 'alias2');
932 932
 
933 933
         $criteria = new Criteria();
934 934
         $criteria->where($criteria->expr()->eq('alias1.field', 'value1'));
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
     {
1045 1045
         $qb = $this->_em->createQueryBuilder()
1046 1046
             ->add('select', 'u')
1047
-            ->add('from', CmsUser::class . ' u');
1047
+            ->add('from', CmsUser::class.' u');
1048 1048
 
1049 1049
         $this->assertEquals('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u', $qb->getDQL());
1050 1050
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Export/AbstractClassMetadataExporterTest.php 2 patches
Doc Comments   +9 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,6 +48,9 @@  discard block
 block discarded – undo
48 48
         return EntityManagerMock::create($conn, $config, $eventManager);
49 49
     }
50 50
 
51
+    /**
52
+     * @param string $path
53
+     */
51 54
     protected function _createMetadataDriver($type, $path)
52 55
     {
53 56
         $mappingDriver = [
@@ -67,6 +70,9 @@  discard block
 block discarded – undo
67 70
         return $driver;
68 71
     }
69 72
 
73
+    /**
74
+     * @param EntityManagerMock $em
75
+     */
70 76
     protected function _createClassMetadataFactory($em, $type)
71 77
     {
72 78
         $factory = ($type === 'annotation')
@@ -277,7 +283,6 @@  discard block
 block discarded – undo
277 283
 
278 284
     /**
279 285
      * @depends testOneToManyAssociationsAreExported
280
-     * @param ClassMetadataInfo $metadata
281 286
      */
282 287
     public function testManyToManyAssociationsAreExported($class)
283 288
     {
@@ -376,6 +381,9 @@  discard block
 block discarded – undo
376 381
 #        $this->_deleteDirectory(__DIR__ . '/export/'.$this->_getType());
377 382
     }
378 383
 
384
+    /**
385
+     * @param string $path
386
+     */
379 387
     protected function _deleteDirectory($path)
380 388
     {
381 389
         if (is_file($path)) {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $driverMock = new DriverMock();
41 41
         $config = new Configuration();
42
-        $config->setProxyDir(__DIR__ . '/../../Proxies');
42
+        $config->setProxyDir(__DIR__.'/../../Proxies');
43 43
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
44 44
         $eventManager = new EventManager();
45 45
         $conn = new ConnectionMock([], $driverMock, $config, $eventManager);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             'yaml'       => YamlDriver::class,
58 58
         ];
59 59
 
60
-        $this->assertArrayHasKey($type, $mappingDriver, "There is no metadata driver for the type '" . $type . "'.");
60
+        $this->assertArrayHasKey($type, $mappingDriver, "There is no metadata driver for the type '".$type."'.");
61 61
 
62 62
         $class  = $mappingDriver[$type];
63 63
         $driver = ($type === 'annotation')
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function testExportDirectoryAndFilesAreCreated()
82 82
     {
83
-        $this->_deleteDirectory(__DIR__ . '/export/'.$this->_getType());
83
+        $this->_deleteDirectory(__DIR__.'/export/'.$this->_getType());
84 84
 
85 85
         $type = $this->_getType();
86
-        $metadataDriver = $this->_createMetadataDriver($type, __DIR__ . '/' . $type);
86
+        $metadataDriver = $this->_createMetadataDriver($type, __DIR__.'/'.$type);
87 87
         $em = $this->_createEntityManager($metadataDriver);
88 88
         $cmf = $this->_createClassMetadataFactory($em, $type);
89 89
         $metadata = $cmf->getAllMetadata();
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
         $type = $this->_getType();
96 96
         $cme = new ClassMetadataExporter();
97
-        $exporter = $cme->getExporter($type, __DIR__ . '/export/' . $type);
97
+        $exporter = $cme->getExporter($type, __DIR__.'/export/'.$type);
98 98
 
99 99
         if ($type === 'annotation') {
100 100
             $entityGenerator = new EntityGenerator();
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
         $exporter->export();
110 110
 
111 111
         if ($type == 'annotation') {
112
-            $this->assertTrue(file_exists(__DIR__ . '/export/' . $type . '/'.str_replace('\\', '/', ExportedUser::class).$this->_extension));
112
+            $this->assertTrue(file_exists(__DIR__.'/export/'.$type.'/'.str_replace('\\', '/', ExportedUser::class).$this->_extension));
113 113
         } else {
114
-            $this->assertTrue(file_exists(__DIR__ . '/export/' . $type . '/Doctrine.Tests.ORM.Tools.Export.ExportedUser'.$this->_extension));
114
+            $this->assertTrue(file_exists(__DIR__.'/export/'.$type.'/Doctrine.Tests.ORM.Tools.Export.ExportedUser'.$this->_extension));
115 115
         }
116 116
     }
117 117
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         $type = $this->_getType();
124 124
 
125
-        $metadataDriver = $this->_createMetadataDriver($type, __DIR__ . '/export/' . $type);
125
+        $metadataDriver = $this->_createMetadataDriver($type, __DIR__.'/export/'.$type);
126 126
         $em = $this->_createEntityManager($metadataDriver);
127 127
         $cmf = $this->_createClassMetadataFactory($em, $type);
128 128
         $metadata = $cmf->getAllMetadata();
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $type = $this->_getType();
209 209
 
210 210
         if ($type == 'xml') {
211
-            $xml = simplexml_load_file(__DIR__ . '/export/'.$type.'/Doctrine.Tests.ORM.Tools.Export.ExportedUser.dcm.xml');
211
+            $xml = simplexml_load_file(__DIR__.'/export/'.$type.'/Doctrine.Tests.ORM.Tools.Export.ExportedUser.dcm.xml');
212 212
 
213 213
             $xml->registerXPathNamespace("d", "http://doctrine-project.org/schemas/orm/doctrine-mapping");
214 214
             $nodes = $xml->xpath("/d:doctrine-mapping/d:entity/d:field[@name='name' and @type='string' and @nullable='true']");
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
         $type = $this->_getType();
353 353
 
354 354
         if ($type == 'xml') {
355
-            $xml = simplexml_load_file(__DIR__ . '/export/'.$type.'/Doctrine.Tests.ORM.Tools.Export.ExportedUser.dcm.xml');
355
+            $xml = simplexml_load_file(__DIR__.'/export/'.$type.'/Doctrine.Tests.ORM.Tools.Export.ExportedUser.dcm.xml');
356 356
 
357 357
             $xml->registerXPathNamespace("d", "http://doctrine-project.org/schemas/orm/doctrine-mapping");
358 358
             $nodes = $xml->xpath("/d:doctrine-mapping/d:entity/d:one-to-many[@field='interests']/d:cascade/d:*");
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
             $this->assertEquals('cascade-all', $nodes[0]->getName());
362 362
         } else if ($type == 'yaml') {
363 363
             $yaml = new Parser();
364
-            $value = $yaml->parse(file_get_contents(__DIR__ . '/export/'.$type.'/Doctrine.Tests.ORM.Tools.Export.ExportedUser.dcm.yml'));
364
+            $value = $yaml->parse(file_get_contents(__DIR__.'/export/'.$type.'/Doctrine.Tests.ORM.Tools.Export.ExportedUser.dcm.yml'));
365 365
 
366 366
             $this->assertTrue(isset($value[ExportedUser::class]['oneToMany']['interests']['cascade']));
367 367
             $this->assertEquals(1, count($value[ExportedUser::class]['oneToMany']['interests']['cascade']));
@@ -381,10 +381,10 @@  discard block
 block discarded – undo
381 381
         if (is_file($path)) {
382 382
             return unlink($path);
383 383
         } else if (is_dir($path)) {
384
-            $files = glob(rtrim($path,'/').'/*');
384
+            $files = glob(rtrim($path, '/').'/*');
385 385
 
386 386
             if (is_array($files)) {
387
-                foreach ($files as $file){
387
+                foreach ($files as $file) {
388 388
                     $this->_deleteDirectory($file);
389 389
                 }
390 390
             }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
89 89
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $updateClause->aliasIdentificationVariable);
90 90
 
91
-        $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
92
-                . ' SELECT t0.' . implode(', t0.', $idColumnNames);
91
+        $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')'
92
+                . ' SELECT t0.'.implode(', t0.', $idColumnNames);
93 93
 
94 94
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $updateClause->aliasIdentificationVariable);
95 95
         $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->_insertSql .= $sqlWalker->walkFromClause($fromClause);
98 98
 
99 99
         // 2. Create ID subselect statement used in UPDATE ... WHERE ... IN (subselect)
100
-        $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable;
100
+        $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable;
101 101
 
102 102
         // 3. Create and store UPDATE statements
103 103
         $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         foreach (array_reverse($classNames) as $className) {
107 107
             $affected = false;
108 108
             $class = $em->getClassMetadata($className);
109
-            $updateSql = 'UPDATE ' . $quoteStrategy->getTableName($class, $platform) . ' SET ';
109
+            $updateSql = 'UPDATE '.$quoteStrategy->getTableName($class, $platform).' SET ';
110 110
 
111 111
             foreach ($updateItems as $updateItem) {
112 112
                 $field = $updateItem->pathExpression->field;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
 
135 135
             if ($affected) {
136
-                $this->_sqlStatements[$i] = $updateSql . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
136
+                $this->_sqlStatements[$i] = $updateSql.' WHERE ('.$idColumnList.') IN ('.$idSubselect.')';
137 137
             }
138 138
         }
139 139
 
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
             ];
153 153
         }
154 154
 
155
-        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
156
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
155
+        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
156
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
157 157
 
158 158
         $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
159 159
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
78 78
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $primaryDqlAlias);
79 79
 
80
-        $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
81
-                . ' SELECT t0.' . implode(', t0.', $idColumnNames);
80
+        $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')'
81
+                . ' SELECT t0.'.implode(', t0.', $idColumnNames);
82 82
 
83 83
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias);
84 84
         $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]);
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         // 2. Create ID subselect statement used in DELETE ... WHERE ... IN (subselect)
93
-        $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable;
93
+        $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable;
94 94
 
95 95
         // 3. Create and store DELETE statements
96 96
         $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses);
97 97
         foreach (array_reverse($classNames) as $className) {
98 98
             $tableName = $quoteStrategy->getTableName($em->getClassMetadata($className), $platform);
99
-            $this->_sqlStatements[] = 'DELETE FROM ' . $tableName
100
-                    . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
99
+            $this->_sqlStatements[] = 'DELETE FROM '.$tableName
100
+                    . ' WHERE ('.$idColumnList.') IN ('.$idSubselect.')';
101 101
         }
102 102
 
103 103
         // 4. Store DDL for temporary identifier table.
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
                 'type'    => Type::getType(PersisterHelper::getTypeOfColumn($idColumnName, $rootClass, $em)),
109 109
             ];
110 110
         }
111
-        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
112
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
111
+        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
112
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
113 113
         $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
114 114
     }
115 115
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 3 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -444,7 +444,9 @@  discard block
 block discarded – undo
444 444
         foreach ($dqlAliases as $dqlAlias) {
445 445
             $class = $this->queryComponents[$dqlAlias]['metadata'];
446 446
 
447
-            if ( ! $class->isInheritanceTypeSingleTable()) continue;
447
+            if ( ! $class->isInheritanceTypeSingleTable()) {
448
+                continue;
449
+            }
448 450
 
449 451
             $conn   = $this->em->getConnection();
450 452
             $values = [];
@@ -782,7 +784,9 @@  discard block
 block discarded – undo
782 784
 
783 785
                 foreach ($subClass->associationMappings as $assoc) {
784 786
                     // Skip if association is inherited
785
-                    if (isset($assoc['inherited'])) continue;
787
+                    if (isset($assoc['inherited'])) {
788
+                        continue;
789
+                    }
786 790
 
787 791
                     if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
788 792
                         $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -2041,6 +2041,7 @@
 block discarded – undo
2041 2041
 
2042 2042
     /**
2043 2043
      * {@inheritdoc}
2044
+     * @param AST\InputParameter $inParam
2044 2045
      */
2045 2046
     public function walkInParameter($inParam)
2046 2047
     {
Please login to merge, or discard this patch.
Spacing   +119 added lines, -119 removed lines patch added patch discarded remove patch
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
      */
290 290
     public function getSQLTableAlias($tableName, $dqlAlias = '')
291 291
     {
292
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
292
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
293 293
 
294 294
         if ( ! isset($this->tableAliasMap[$tableName])) {
295 295
             $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't')
296
-                . $this->tableAliasCounter++ . '_';
296
+                . $this->tableAliasCounter++.'_';
297 297
         }
298 298
 
299 299
         return $this->tableAliasMap[$tableName];
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      */
312 312
     public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')
313 313
     {
314
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
314
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
315 315
 
316 316
         $this->tableAliasMap[$tableName] = $alias;
317 317
 
@@ -352,12 +352,12 @@  discard block
 block discarded – undo
352 352
 
353 353
             // If this is a joined association we must use left joins to preserve the correct result.
354 354
             $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER ';
355
-            $sql .= 'JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON ';
355
+            $sql .= 'JOIN '.$this->quoteStrategy->getTableName($parentClass, $this->platform).' '.$tableAlias.' ON ';
356 356
 
357 357
             $sqlParts = [];
358 358
 
359 359
             foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) {
360
-                $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName;
360
+                $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName;
361 361
             }
362 362
 
363 363
             // Add filters on the root class
@@ -378,12 +378,12 @@  discard block
 block discarded – undo
378 378
             $subClass   = $this->em->getClassMetadata($subClassName);
379 379
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
380 380
 
381
-            $sql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON ';
381
+            $sql .= ' LEFT JOIN '.$this->quoteStrategy->getTableName($subClass, $this->platform).' '.$tableAlias.' ON ';
382 382
 
383 383
             $sqlParts = [];
384 384
 
385 385
             foreach ($this->quoteStrategy->getIdentifierColumnNames($subClass, $this->platform) as $columnName) {
386
-                $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName;
386
+                $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName;
387 387
             }
388 388
 
389 389
             $sql .= implode(' AND ', $sqlParts);
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
                     ? $persister->getOwningTable($fieldName)
416 416
                     : $qComp['metadata']->getTableName();
417 417
 
418
-                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName;
418
+                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName;
419 419
 
420 420
                 // OrderByClause should replace an ordered relation. see - DDC-2475
421 421
                 if (isset($this->orderedColumnsMap[$orderedColumn])) {
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                 }
424 424
 
425 425
                 $this->orderedColumnsMap[$orderedColumn] = $orientation;
426
-                $orderedColumns[] = $orderedColumn . ' ' . $orientation;
426
+                $orderedColumns[] = $orderedColumn.' '.$orientation;
427 427
             }
428 428
         }
429 429
 
@@ -458,15 +458,15 @@  discard block
 block discarded – undo
458 458
             }
459 459
 
460 460
             $sqlTableAlias = ($this->useSqlTableAliases)
461
-                ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.'
461
+                ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.'
462 462
                 : '';
463 463
 
464
-            $sqlParts[] = $sqlTableAlias . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')';
464
+            $sqlParts[] = $sqlTableAlias.$class->discriminatorColumn['name'].' IN ('.implode(', ', $values).')';
465 465
         }
466 466
 
467 467
         $sql = implode(' AND ', $sqlParts);
468 468
 
469
-        return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql;
469
+        return (count($sqlParts) > 1) ? '('.$sql.')' : $sql;
470 470
     }
471 471
 
472 472
     /**
@@ -479,11 +479,11 @@  discard block
 block discarded – undo
479 479
      */
480 480
     private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
481 481
     {
482
-        if (!$this->em->hasFilters()) {
482
+        if ( ! $this->em->hasFilters()) {
483 483
             return '';
484 484
         }
485 485
 
486
-        switch($targetEntity->inheritanceType) {
486
+        switch ($targetEntity->inheritanceType) {
487 487
             case ClassMetadata::INHERITANCE_TYPE_NONE:
488 488
                 break;
489 489
             case ClassMetadata::INHERITANCE_TYPE_JOINED:
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
         $filterClauses = [];
507 507
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
508 508
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
509
-                $filterClauses[] = '(' . $filterExpr . ')';
509
+                $filterClauses[] = '('.$filterExpr.')';
510 510
             }
511 511
         }
512 512
 
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
         }
539 539
 
540 540
         if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) {
541
-            $sql .= ' ORDER BY ' . $orderBySql;
541
+            $sql .= ' ORDER BY '.$orderBySql;
542 542
         }
543 543
 
544 544
         if ($limit !== null || $offset !== null) {
@@ -550,11 +550,11 @@  discard block
 block discarded – undo
550 550
         }
551 551
 
552 552
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
553
-            return $sql . ' ' . $this->platform->getReadLockSQL();
553
+            return $sql.' '.$this->platform->getReadLockSQL();
554 554
         }
555 555
 
556 556
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
557
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
557
+            return $sql.' '.$this->platform->getWriteLockSQL();
558 558
         }
559 559
 
560 560
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
         $sqlParts   = [];
610 610
 
611 611
         foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) {
612
-            $sqlParts[] = $tableAlias . '.' . $columnName;
612
+            $sqlParts[] = $tableAlias.'.'.$columnName;
613 613
         }
614 614
 
615 615
         return implode(', ', $sqlParts);
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
                 $class = $this->queryComponents[$dqlAlias]['metadata'];
653 653
 
654 654
                 if ($this->useSqlTableAliases) {
655
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
655
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
656 656
                 }
657 657
 
658 658
                 $sql .= $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
                 }
682 682
 
683 683
                 if ($this->useSqlTableAliases) {
684
-                    $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.';
684
+                    $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.';
685 685
                 }
686 686
 
687 687
                 $sql .= reset($assoc['targetToSourceKeyColumns']);
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
      */
700 700
     public function walkSelectClause($selectClause)
701 701
     {
702
-        $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '');
702
+        $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : '');
703 703
         $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions));
704 704
 
705 705
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) {
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
                 $discrColumn = $rootClass->discriminatorColumn;
737 737
                 $columnAlias = $this->getSQLColumnAlias($discrColumn['name']);
738 738
 
739
-                $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias;
739
+                $sqlSelectExpressions[] = $tblAlias.'.'.$discrColumn['name'].' AS '.$columnAlias;
740 740
 
741 741
                 $this->rsm->setDiscriminatorColumn($dqlAlias, $columnAlias);
742 742
                 $this->rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName'], false, $discrColumn['type']);
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
             // Add foreign key columns of class and also parent classes
751 751
             foreach ($class->associationMappings as $assoc) {
752 752
                 if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)
753
-                    || ( ! $addMetaColumns && !isset($assoc['id']))) {
753
+                    || ( ! $addMetaColumns && ! isset($assoc['id']))) {
754 754
                     continue;
755 755
                 }
756 756
 
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
                     $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
766 766
 
767 767
                     $quotedColumnName       = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
768
-                    $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias;
768
+                    $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias;
769 769
 
770 770
                     $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType);
771 771
                 }
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
                             $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
795 795
 
796 796
                             $quotedColumnName       = $this->quoteStrategy->getJoinColumnName($joinColumn, $subClass, $this->platform);
797
-                            $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias;
797
+                            $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias;
798 798
 
799 799
                             $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType);
800 800
                         }
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
821 821
         }
822 822
 
823
-        return ' FROM ' . implode(', ', $sqlParts);
823
+        return ' FROM '.implode(', ', $sqlParts);
824 824
     }
825 825
 
826 826
     /**
@@ -897,14 +897,14 @@  discard block
 block discarded – undo
897 897
         }
898 898
 
899 899
         $sql = $this->platform->appendLockHint(
900
-            $this->quoteStrategy->getTableName($class, $this->platform) . ' ' .
900
+            $this->quoteStrategy->getTableName($class, $this->platform).' '.
901 901
             $this->getSQLTableAlias($class->getTableName(), $dqlAlias),
902 902
             $this->query->getHint(Query::HINT_LOCK_MODE)
903 903
         );
904 904
 
905 905
         if ($class->isInheritanceTypeJoined()) {
906 906
             if ($buildNestedJoins) {
907
-                $sql = '(' . $sql . $this->_generateClassTableInheritanceJoins($class, $dqlAlias) . ')';
907
+                $sql = '('.$sql.$this->_generateClassTableInheritanceJoins($class, $dqlAlias).')';
908 908
             } else {
909 909
                 $sql .= $this->_generateClassTableInheritanceJoins($class, $dqlAlias);
910 910
             }
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
         // Ensure we got the owning side, since it has all mapping info
944 944
         $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation;
945 945
 
946
-        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
946
+        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
947 947
             if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) {
948 948
                 throw QueryException::iterateWithFetchJoinNotAllowed($assoc);
949 949
             }
@@ -963,12 +963,12 @@  discard block
 block discarded – undo
963 963
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
964 964
 
965 965
                     if ($relation['isOwningSide']) {
966
-                        $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn;
966
+                        $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn;
967 967
 
968 968
                         continue;
969 969
                     }
970 970
 
971
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn;
971
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn;
972 972
                 }
973 973
 
974 974
                 // Apply remaining inheritance restrictions
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
                 }
987 987
 
988 988
                 $targetTableJoin = [
989
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
989
+                    'table' => $targetTableName.' '.$targetTableAlias,
990 990
                     'condition' => implode(' AND ', $conditions),
991 991
                 ];
992 992
                 break;
@@ -1006,10 +1006,10 @@  discard block
 block discarded – undo
1006 1006
                     $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
1007 1007
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
1008 1008
 
1009
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1009
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
1010 1010
                 }
1011 1011
 
1012
-                $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1012
+                $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1013 1013
 
1014 1014
                 // Join target table
1015 1015
                 $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
                     $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
1024 1024
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
1025 1025
 
1026
-                    $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1026
+                    $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
1027 1027
                 }
1028 1028
 
1029 1029
                 // Apply remaining inheritance restrictions
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
                 }
1042 1042
 
1043 1043
                 $targetTableJoin = [
1044
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
1044
+                    'table' => $targetTableName.' '.$targetTableAlias,
1045 1045
                     'condition' => implode(' AND ', $conditions),
1046 1046
                 ];
1047 1047
                 break;
@@ -1051,22 +1051,22 @@  discard block
 block discarded – undo
1051 1051
         }
1052 1052
 
1053 1053
         // Handle WITH clause
1054
-        $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1054
+        $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1055 1055
 
1056 1056
         if ($targetClass->isInheritanceTypeJoined()) {
1057 1057
             $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1058 1058
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1059 1059
             if ($withCondition) {
1060
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1060
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1061 1061
             } else {
1062
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1062
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1063 1063
             }
1064 1064
         } else {
1065
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1065
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1066 1066
         }
1067 1067
 
1068 1068
         if ($withCondition) {
1069
-            $sql .= ' AND ' . $withCondition;
1069
+            $sql .= ' AND '.$withCondition;
1070 1070
         }
1071 1071
 
1072 1072
         // Apply the indexes
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1100 1100
         }
1101 1101
 
1102
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1102
+        return ' ORDER BY '.implode(', ', $orderByItems);
1103 1103
     }
1104 1104
 
1105 1105
     /**
@@ -1116,10 +1116,10 @@  discard block
 block discarded – undo
1116 1116
         $this->orderedColumnsMap[$sql] = $type;
1117 1117
 
1118 1118
         if ($expr instanceof AST\Subselect) {
1119
-            return '(' . $sql . ') ' . $type;
1119
+            return '('.$sql.') '.$type;
1120 1120
         }
1121 1121
 
1122
-        return $sql . ' ' . $type;
1122
+        return $sql.' '.$type;
1123 1123
     }
1124 1124
 
1125 1125
     /**
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
      */
1128 1128
     public function walkHavingClause($havingClause)
1129 1129
     {
1130
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1130
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1131 1131
     }
1132 1132
 
1133 1133
     /**
@@ -1150,7 +1150,7 @@  discard block
 block discarded – undo
1150 1150
                 $conditions = [];
1151 1151
 
1152 1152
                 if ($join->conditionalExpression) {
1153
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1153
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1154 1154
                 }
1155 1155
 
1156 1156
                 $isUnconditionalJoin = empty($conditions);
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
                     ? ' AND '
1159 1159
                     : ' ON ';
1160 1160
 
1161
-                $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, !$isUnconditionalJoin);
1161
+                $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, ! $isUnconditionalJoin);
1162 1162
 
1163 1163
                 // Apply remaining inheritance restrictions
1164 1164
                 $discrSql = $this->_generateDiscriminatorColumnConditionSQL([$dqlAlias]);
@@ -1175,7 +1175,7 @@  discard block
 block discarded – undo
1175 1175
                 }
1176 1176
 
1177 1177
                 if ($conditions) {
1178
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1178
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1179 1179
                 }
1180 1180
 
1181 1181
                 break;
@@ -1205,7 +1205,7 @@  discard block
 block discarded – undo
1205 1205
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1206 1206
         }
1207 1207
 
1208
-        $sql .= implode(', ', $scalarExpressions) . ')';
1208
+        $sql .= implode(', ', $scalarExpressions).')';
1209 1209
 
1210 1210
         return $sql;
1211 1211
     }
@@ -1227,7 +1227,7 @@  discard block
 block discarded – undo
1227 1227
             ? $this->conn->quote($nullIfExpression->secondExpression)
1228 1228
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1229 1229
 
1230
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1230
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1231 1231
     }
1232 1232
 
1233 1233
     /**
@@ -1242,11 +1242,11 @@  discard block
 block discarded – undo
1242 1242
         $sql = 'CASE';
1243 1243
 
1244 1244
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1245
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1246
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1245
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1246
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1247 1247
         }
1248 1248
 
1249
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1249
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1250 1250
 
1251 1251
         return $sql;
1252 1252
     }
@@ -1260,14 +1260,14 @@  discard block
 block discarded – undo
1260 1260
      */
1261 1261
     public function walkSimpleCaseExpression($simpleCaseExpression)
1262 1262
     {
1263
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1263
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1264 1264
 
1265 1265
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1266
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1267
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1266
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1267
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1268 1268
         }
1269 1269
 
1270
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1270
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1271 1271
 
1272 1272
         return $sql;
1273 1273
     }
@@ -1301,14 +1301,14 @@  discard block
 block discarded – undo
1301 1301
                 $fieldMapping  = $class->fieldMappings[$fieldName];
1302 1302
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
1303 1303
                 $columnAlias   = $this->getSQLColumnAlias($fieldMapping['columnName']);
1304
-                $col           = $sqlTableAlias . '.' . $columnName;
1304
+                $col           = $sqlTableAlias.'.'.$columnName;
1305 1305
 
1306 1306
                 if (isset($fieldMapping['requireSQLConversion'])) {
1307 1307
                     $type = Type::getType($fieldMapping['type']);
1308 1308
                     $col  = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform());
1309 1309
                 }
1310 1310
 
1311
-                $sql .= $col . ' AS ' . $columnAlias;
1311
+                $sql .= $col.' AS '.$columnAlias;
1312 1312
 
1313 1313
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1314 1314
 
@@ -1333,7 +1333,7 @@  discard block
 block discarded – undo
1333 1333
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1334 1334
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1335 1335
 
1336
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1336
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1337 1337
 
1338 1338
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1339 1339
 
@@ -1347,7 +1347,7 @@  discard block
 block discarded – undo
1347 1347
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1348 1348
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1349 1349
 
1350
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1350
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1351 1351
 
1352 1352
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1353 1353
 
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
                 break;
1359 1359
 
1360 1360
             case ($expr instanceof AST\NewObjectExpression):
1361
-                $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable);
1361
+                $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable);
1362 1362
                 break;
1363 1363
 
1364 1364
             default:
@@ -1399,14 +1399,14 @@  discard block
 block discarded – undo
1399 1399
                     $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
1400 1400
                     $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
1401 1401
 
1402
-                    $col = $sqlTableAlias . '.' . $quotedColumnName;
1402
+                    $col = $sqlTableAlias.'.'.$quotedColumnName;
1403 1403
 
1404 1404
                     if (isset($mapping['requireSQLConversion'])) {
1405 1405
                         $type = Type::getType($mapping['type']);
1406 1406
                         $col = $type->convertToPHPValueSQL($col, $this->platform);
1407 1407
                     }
1408 1408
 
1409
-                    $sqlParts[] = $col . ' AS '. $columnAlias;
1409
+                    $sqlParts[] = $col.' AS '.$columnAlias;
1410 1410
 
1411 1411
                     $this->scalarResultAliasMap[$resultAlias][] = $columnAlias;
1412 1412
 
@@ -1423,21 +1423,21 @@  discard block
 block discarded – undo
1423 1423
                         $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
1424 1424
 
1425 1425
                         foreach ($subClass->fieldMappings as $fieldName => $mapping) {
1426
-                            if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) {
1426
+                            if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) {
1427 1427
                                 continue;
1428 1428
                             }
1429 1429
 
1430 1430
                             $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
1431 1431
                             $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform);
1432 1432
 
1433
-                            $col = $sqlTableAlias . '.' . $quotedColumnName;
1433
+                            $col = $sqlTableAlias.'.'.$quotedColumnName;
1434 1434
 
1435 1435
                             if (isset($mapping['requireSQLConversion'])) {
1436 1436
                                 $type = Type::getType($mapping['type']);
1437 1437
                                 $col = $type->convertToPHPValueSQL($col, $this->platform);
1438 1438
                             }
1439 1439
 
1440
-                            $sqlParts[] = $col . ' AS ' . $columnAlias;
1440
+                            $sqlParts[] = $col.' AS '.$columnAlias;
1441 1441
 
1442 1442
                             $this->scalarResultAliasMap[$resultAlias][] = $columnAlias;
1443 1443
 
@@ -1457,7 +1457,7 @@  discard block
 block discarded – undo
1457 1457
      */
1458 1458
     public function walkQuantifiedExpression($qExpr)
1459 1459
     {
1460
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1460
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1461 1461
     }
1462 1462
 
1463 1463
     /**
@@ -1497,7 +1497,7 @@  discard block
 block discarded – undo
1497 1497
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1498 1498
         }
1499 1499
 
1500
-        return ' FROM ' . implode(', ', $sqlParts);
1500
+        return ' FROM '.implode(', ', $sqlParts);
1501 1501
     }
1502 1502
 
1503 1503
     /**
@@ -1505,7 +1505,7 @@  discard block
 block discarded – undo
1505 1505
      */
1506 1506
     public function walkSimpleSelectClause($simpleSelectClause)
1507 1507
     {
1508
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1508
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1509 1509
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1510 1510
     }
1511 1511
 
@@ -1524,10 +1524,10 @@  discard block
 block discarded – undo
1524 1524
      * @param null|string               $newObjectResultAlias
1525 1525
      * @return string The SQL.
1526 1526
      */
1527
-    public function walkNewObject($newObjectExpression, $newObjectResultAlias=null)
1527
+    public function walkNewObject($newObjectExpression, $newObjectResultAlias = null)
1528 1528
     {
1529 1529
         $sqlSelectExpressions = [];
1530
-        $objIndex             = $newObjectResultAlias?:$this->newObjectCounter++;
1530
+        $objIndex             = $newObjectResultAlias ?: $this->newObjectCounter++;
1531 1531
 
1532 1532
         foreach ($newObjectExpression->args as $argIndex => $e) {
1533 1533
             $resultAlias = $this->scalarResultCounter++;
@@ -1540,7 +1540,7 @@  discard block
 block discarded – undo
1540 1540
                     break;
1541 1541
 
1542 1542
                 case ($e instanceof AST\Subselect):
1543
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1543
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1544 1544
                     break;
1545 1545
 
1546 1546
                 case ($e instanceof AST\PathExpression):
@@ -1549,7 +1549,7 @@  discard block
 block discarded – undo
1549 1549
                     $class     = $qComp['metadata'];
1550 1550
                     $fieldType = $class->fieldMappings[$e->field]['type'];
1551 1551
 
1552
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1552
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1553 1553
                     break;
1554 1554
 
1555 1555
                 case ($e instanceof AST\Literal):
@@ -1563,11 +1563,11 @@  discard block
 block discarded – undo
1563 1563
                             break;
1564 1564
                     }
1565 1565
 
1566
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1566
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1567 1567
                     break;
1568 1568
 
1569 1569
                 default:
1570
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1570
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1571 1571
                     break;
1572 1572
             }
1573 1573
 
@@ -1600,10 +1600,10 @@  discard block
 block discarded – undo
1600 1600
             case ($expr instanceof AST\Subselect):
1601 1601
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1602 1602
 
1603
-                $columnAlias = 'sclr' . $this->aliasCounter++;
1603
+                $columnAlias = 'sclr'.$this->aliasCounter++;
1604 1604
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1605 1605
 
1606
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1606
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1607 1607
                 break;
1608 1608
 
1609 1609
             case ($expr instanceof AST\Functions\FunctionNode):
@@ -1620,7 +1620,7 @@  discard block
 block discarded – undo
1620 1620
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1621 1621
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1622 1622
 
1623
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1623
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1624 1624
                 break;
1625 1625
 
1626 1626
             case ($expr instanceof AST\ParenthesisExpression):
@@ -1640,8 +1640,8 @@  discard block
 block discarded – undo
1640 1640
      */
1641 1641
     public function walkAggregateExpression($aggExpression)
1642 1642
     {
1643
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1644
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1643
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1644
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1645 1645
     }
1646 1646
 
1647 1647
     /**
@@ -1655,7 +1655,7 @@  discard block
 block discarded – undo
1655 1655
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1656 1656
         }
1657 1657
 
1658
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1658
+        return ' GROUP BY '.implode(', ', $sqlParts);
1659 1659
     }
1660 1660
 
1661 1661
     /**
@@ -1712,7 +1712,7 @@  discard block
 block discarded – undo
1712 1712
     {
1713 1713
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1714 1714
         $tableName = $class->getTableName();
1715
-        $sql       = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform);
1715
+        $sql       = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform);
1716 1716
 
1717 1717
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1718 1718
         $this->rootAliases[] = $deleteClause->aliasIdentificationVariable;
@@ -1727,12 +1727,12 @@  discard block
 block discarded – undo
1727 1727
     {
1728 1728
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1729 1729
         $tableName = $class->getTableName();
1730
-        $sql       = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform);
1730
+        $sql       = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform);
1731 1731
 
1732 1732
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1733 1733
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1734 1734
 
1735
-        $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1735
+        $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1736 1736
 
1737 1737
         return $sql;
1738 1738
     }
@@ -1745,7 +1745,7 @@  discard block
 block discarded – undo
1745 1745
         $useTableAliasesBefore = $this->useSqlTableAliases;
1746 1746
         $this->useSqlTableAliases = false;
1747 1747
 
1748
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1748
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1749 1749
         $newValue = $updateItem->newValue;
1750 1750
 
1751 1751
         switch (true) {
@@ -1788,7 +1788,7 @@  discard block
 block discarded – undo
1788 1788
 
1789 1789
             if (count($filterClauses)) {
1790 1790
                 if ($condSql) {
1791
-                    $condSql = '(' . $condSql . ') AND ';
1791
+                    $condSql = '('.$condSql.') AND ';
1792 1792
                 }
1793 1793
 
1794 1794
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1796,11 +1796,11 @@  discard block
 block discarded – undo
1796 1796
         }
1797 1797
 
1798 1798
         if ($condSql) {
1799
-            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1799
+            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql);
1800 1800
         }
1801 1801
 
1802 1802
         if ($discrSql) {
1803
-            return ' WHERE ' . $discrSql;
1803
+            return ' WHERE '.$discrSql;
1804 1804
         }
1805 1805
 
1806 1806
         return '';
@@ -1843,7 +1843,7 @@  discard block
 block discarded – undo
1843 1843
         // if only one ConditionalPrimary is defined
1844 1844
         return ( ! ($factor instanceof AST\ConditionalFactor))
1845 1845
             ? $this->walkConditionalPrimary($factor)
1846
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1846
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1847 1847
     }
1848 1848
 
1849 1849
     /**
@@ -1858,7 +1858,7 @@  discard block
 block discarded – undo
1858 1858
         if ($primary->isConditionalExpression()) {
1859 1859
             $condExpr = $primary->conditionalExpression;
1860 1860
 
1861
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1861
+            return '('.$this->walkConditionalExpression($condExpr).')';
1862 1862
         }
1863 1863
     }
1864 1864
 
@@ -1869,7 +1869,7 @@  discard block
 block discarded – undo
1869 1869
     {
1870 1870
         $sql = ($existsExpr->not) ? 'NOT ' : '';
1871 1871
 
1872
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1872
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1873 1873
 
1874 1874
         return $sql;
1875 1875
     }
@@ -1913,7 +1913,7 @@  discard block
 block discarded – undo
1913 1913
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1914 1914
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1915 1915
 
1916
-            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE ';
1916
+            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE ';
1917 1917
 
1918 1918
             $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']];
1919 1919
             $sqlParts    = [];
@@ -1921,7 +1921,7 @@  discard block
 block discarded – undo
1921 1921
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) {
1922 1922
                 $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform);
1923 1923
 
1924
-                $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn;
1924
+                $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn;
1925 1925
             }
1926 1926
 
1927 1927
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1929,7 +1929,7 @@  discard block
 block discarded – undo
1929 1929
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1930 1930
                 }
1931 1931
 
1932
-                $sqlParts[] = $targetTableAlias . '.'  . $targetColumnName . ' = ' . $entitySql;
1932
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql;
1933 1933
             }
1934 1934
 
1935 1935
             $sql .= implode(' AND ', $sqlParts);
@@ -1945,8 +1945,8 @@  discard block
 block discarded – undo
1945 1945
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1946 1946
 
1947 1947
             // join to target table
1948
-            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias
1949
-                . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON ';
1948
+            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias
1949
+                . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON ';
1950 1950
 
1951 1951
             // join conditions
1952 1952
             $joinColumns  = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns'];
@@ -1955,7 +1955,7 @@  discard block
 block discarded – undo
1955 1955
             foreach ($joinColumns as $joinColumn) {
1956 1956
                 $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform);
1957 1957
 
1958
-                $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn;
1958
+                $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn;
1959 1959
             }
1960 1960
 
1961 1961
             $sql .= implode(' AND ', $joinSqlParts);
@@ -1967,7 +1967,7 @@  discard block
 block discarded – undo
1967 1967
             foreach ($joinColumns as $joinColumn) {
1968 1968
                 $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform);
1969 1969
 
1970
-                $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn;
1970
+                $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn;
1971 1971
             }
1972 1972
 
1973 1973
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1975,13 +1975,13 @@  discard block
 block discarded – undo
1975 1975
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1976 1976
                 }
1977 1977
 
1978
-                $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')';
1978
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')';
1979 1979
             }
1980 1980
 
1981 1981
             $sql .= implode(' AND ', $sqlParts);
1982 1982
         }
1983 1983
 
1984
-        return $sql . ')';
1984
+        return $sql.')';
1985 1985
     }
1986 1986
 
1987 1987
     /**
@@ -1992,7 +1992,7 @@  discard block
 block discarded – undo
1992 1992
         $sizeFunc = new AST\Functions\SizeFunction('size');
1993 1993
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
1994 1994
 
1995
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
1995
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
1996 1996
     }
1997 1997
 
1998 1998
     /**
@@ -2001,19 +2001,19 @@  discard block
 block discarded – undo
2001 2001
     public function walkNullComparisonExpression($nullCompExpr)
2002 2002
     {
2003 2003
         $expression = $nullCompExpr->expression;
2004
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2004
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2005 2005
 
2006 2006
         // Handle ResultVariable
2007 2007
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2008
-            return $this->walkResultVariable($expression) . $comparison;
2008
+            return $this->walkResultVariable($expression).$comparison;
2009 2009
         }
2010 2010
 
2011 2011
         // Handle InputParameter mapping inclusion to ParserResult
2012 2012
         if ($expression instanceof AST\InputParameter) {
2013
-            return $this->walkInputParameter($expression) . $comparison;
2013
+            return $this->walkInputParameter($expression).$comparison;
2014 2014
         }
2015 2015
 
2016
-        return $expression->dispatch($this) . $comparison;
2016
+        return $expression->dispatch($this).$comparison;
2017 2017
     }
2018 2018
 
2019 2019
     /**
@@ -2021,7 +2021,7 @@  discard block
 block discarded – undo
2021 2021
      */
2022 2022
     public function walkInExpression($inExpr)
2023 2023
     {
2024
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2024
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2025 2025
 
2026 2026
         $sql .= ($inExpr->subselect)
2027 2027
             ? $this->walkSubselect($inExpr->subselect)
@@ -2048,10 +2048,10 @@  discard block
 block discarded – undo
2048 2048
         }
2049 2049
 
2050 2050
         if ($this->useSqlTableAliases) {
2051
-            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.';
2051
+            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.';
2052 2052
         }
2053 2053
 
2054
-        $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
2054
+        $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
2055 2055
         $sql .= $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr);
2056 2056
 
2057 2057
         return $sql;
@@ -2098,8 +2098,8 @@  discard block
 block discarded – undo
2098 2098
             $sql .= ' NOT';
2099 2099
         }
2100 2100
 
2101
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2102
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2101
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2102
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2103 2103
 
2104 2104
         return $sql;
2105 2105
     }
@@ -2114,7 +2114,7 @@  discard block
 block discarded – undo
2114 2114
             ? $this->walkResultVariable($stringExpr)
2115 2115
             : $stringExpr->dispatch($this);
2116 2116
 
2117
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2117
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2118 2118
 
2119 2119
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2120 2120
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2127,7 +2127,7 @@  discard block
 block discarded – undo
2127 2127
         }
2128 2128
 
2129 2129
         if ($likeExpr->escapeChar) {
2130
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2130
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2131 2131
         }
2132 2132
 
2133 2133
         return $sql;
@@ -2154,7 +2154,7 @@  discard block
 block discarded – undo
2154 2154
             ? $leftExpr->dispatch($this)
2155 2155
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2156 2156
 
2157
-        $sql .= ' ' . $compExpr->operator . ' ';
2157
+        $sql .= ' '.$compExpr->operator.' ';
2158 2158
 
2159 2159
         $sql .= ($rightExpr instanceof AST\Node)
2160 2160
             ? $rightExpr->dispatch($this)
@@ -2186,7 +2186,7 @@  discard block
 block discarded – undo
2186 2186
     {
2187 2187
         return ($arithmeticExpr->isSimpleArithmeticExpression())
2188 2188
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2189
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2189
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2190 2190
     }
2191 2191
 
2192 2192
     /**
@@ -2240,7 +2240,7 @@  discard block
 block discarded – undo
2240 2240
 
2241 2241
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2242 2242
 
2243
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2243
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2244 2244
     }
2245 2245
 
2246 2246
     /**
@@ -2253,7 +2253,7 @@  discard block
 block discarded – undo
2253 2253
     public function walkArithmeticPrimary($primary)
2254 2254
     {
2255 2255
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2256
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2256
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2257 2257
         }
2258 2258
 
2259 2259
         if ($primary instanceof AST\Node) {
@@ -2317,6 +2317,6 @@  discard block
 block discarded – undo
2317 2317
             $sqlParameterList[] = $this->conn->quote($dis);
2318 2318
         }
2319 2319
 
2320
-        return '(' . implode(', ', $sqlParameterList) . ')';
2320
+        return '('.implode(', ', $sqlParameterList).')';
2321 2321
     }
2322 2322
 }
Please login to merge, or discard this patch.