Passed
Pull Request — master (#6709)
by Sergey
12:37
created
tests/Doctrine/Tests/ORM/Functional/NewOperatorTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -1089,18 +1089,18 @@  discard block
 block discarded – undo
1089 1089
         $this->assertEquals($this->fixtures[1]->address->country, $result[1]['user']->address->country);
1090 1090
         $this->assertEquals($this->fixtures[2]->address->country, $result[2]['user']->address->country);
1091 1091
 
1092
-        $this->assertEquals($this->fixtures[0]->status,$result[0]['status']);
1093
-        $this->assertEquals($this->fixtures[1]->status,$result[1]['status']);
1094
-        $this->assertEquals($this->fixtures[2]->status,$result[2]['status']);
1092
+        $this->assertEquals($this->fixtures[0]->status, $result[0]['status']);
1093
+        $this->assertEquals($this->fixtures[1]->status, $result[1]['status']);
1094
+        $this->assertEquals($this->fixtures[2]->status, $result[2]['status']);
1095 1095
 
1096
-        $this->assertEquals($this->fixtures[0]->username,$result[0]['cmsUserUsername']);
1097
-        $this->assertEquals($this->fixtures[1]->username,$result[1]['cmsUserUsername']);
1098
-        $this->assertEquals($this->fixtures[2]->username,$result[2]['cmsUserUsername']);
1096
+        $this->assertEquals($this->fixtures[0]->username, $result[0]['cmsUserUsername']);
1097
+        $this->assertEquals($this->fixtures[1]->username, $result[1]['cmsUserUsername']);
1098
+        $this->assertEquals($this->fixtures[2]->username, $result[2]['cmsUserUsername']);
1099 1099
     }
1100 1100
 
1101 1101
     private function dumpResultSetMapping(Query $query)
1102 1102
     {
1103
-        $rsm = (\Closure::bind(function ($q) {
1103
+        $rsm = (\Closure::bind(function($q) {
1104 1104
             return $q->getResultSetMapping();
1105 1105
         }, null, Query::class))($query);
1106 1106
         echo json_encode(get_object_vars($rsm), JSON_PRETTY_PRINT);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 1 patch
Spacing   +125 added lines, -125 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\ORM\Query;
6 6
 
@@ -272,10 +272,10 @@  discard block
 block discarded – undo
272 272
      */
273 273
     public function getSQLTableAlias($tableName, $dqlAlias = '')
274 274
     {
275
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
275
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
276 276
 
277
-        if (! isset($this->tableAliasMap[$tableName])) {
278
-            $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++;
277
+        if ( ! isset($this->tableAliasMap[$tableName])) {
278
+            $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++;
279 279
         }
280 280
 
281 281
         return $this->tableAliasMap[$tableName];
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      */
294 294
     public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')
295 295
     {
296
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
296
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
297 297
 
298 298
         $this->tableAliasMap[$tableName] = $alias;
299 299
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      */
308 308
     public function getSQLColumnAlias()
309 309
     {
310
-        return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++);
310
+        return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++);
311 311
     }
312 312
 
313 313
     /**
@@ -334,14 +334,14 @@  discard block
 block discarded – undo
334 334
 
335 335
             // If this is a joined association we must use left joins to preserve the correct result.
336 336
             $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER ';
337
-            $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
337
+            $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON ';
338 338
 
339 339
             $sqlParts = [];
340 340
 
341 341
             foreach ($class->getIdentifierColumns($this->em) as $column) {
342 342
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
343 343
 
344
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
344
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
345 345
             }
346 346
 
347 347
             $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias);
@@ -365,14 +365,14 @@  discard block
 block discarded – undo
365 365
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
366 366
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
367 367
 
368
-            $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
368
+            $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
369 369
 
370 370
             $sqlParts = [];
371 371
 
372 372
             foreach ($subClass->getIdentifierColumns($this->em) as $column) {
373 373
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
374 374
 
375
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
375
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
376 376
             }
377 377
 
378 378
             $sql .= implode(' AND ', $sqlParts);
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
             $qComp       = $this->queryComponents[$dqlAlias];
394 394
             $association = $qComp['relation'];
395 395
 
396
-            if (! ($association instanceof ToManyAssociationMetadata)) {
396
+            if ( ! ($association instanceof ToManyAssociationMetadata)) {
397 397
                 continue;
398 398
             }
399 399
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
                 $property      = $qComp['metadata']->getProperty($fieldName);
402 402
                 $tableName     = $property->getTableName();
403 403
                 $columnName    = $this->platform->quoteIdentifier($property->getColumnName());
404
-                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName;
404
+                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName;
405 405
 
406 406
                 // OrderByClause should replace an ordered relation. see - DDC-2475
407 407
                 if (isset($this->orderedColumnsMap[$orderedColumn])) {
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
                 }
410 410
 
411 411
                 $this->orderedColumnsMap[$orderedColumn] = $orientation;
412
-                $orderedColumns[]                        = $orderedColumn . ' ' . $orientation;
412
+                $orderedColumns[]                        = $orderedColumn.' '.$orientation;
413 413
             }
414 414
         }
415 415
 
@@ -449,19 +449,19 @@  discard block
 block discarded – undo
449 449
             $discrColumnType  = $discrColumn->getType();
450 450
             $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
451 451
             $sqlTableAlias    = ($this->useSqlTableAliases)
452
-                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
452
+                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
453 453
                 : '';
454 454
 
455 455
             $sqlParts[] = sprintf(
456 456
                 '%s IN (%s)',
457
-                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
457
+                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
458 458
                 implode(', ', $values)
459 459
             );
460 460
         }
461 461
 
462 462
         $sql = implode(' AND ', $sqlParts);
463 463
 
464
-        return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql;
464
+        return isset($sqlParts[1]) ? '('.$sql.')' : $sql;
465 465
     }
466 466
 
467 467
     /**
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      */
475 475
     private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
476 476
     {
477
-        if (! $this->em->hasFilters()) {
477
+        if ( ! $this->em->hasFilters()) {
478 478
             return '';
479 479
         }
480 480
 
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
508 508
 
509 509
             if ($filterExpr !== '') {
510
-                $filterClauses[] = '(' . $filterExpr . ')';
510
+                $filterClauses[] = '('.$filterExpr.')';
511 511
             }
512 512
         }
513 513
 
@@ -538,11 +538,11 @@  discard block
 block discarded – undo
538 538
             $sql .= $this->walkOrderByClause($AST->orderByClause);
539 539
         }
540 540
 
541
-        if (! $AST->orderByClause) {
541
+        if ( ! $AST->orderByClause) {
542 542
             $orderBySql = $this->generateOrderedCollectionOrderByItems();
543 543
 
544 544
             if ($orderBySql) {
545
-                $sql .= ' ORDER BY ' . $orderBySql;
545
+                $sql .= ' ORDER BY '.$orderBySql;
546 546
             }
547 547
         }
548 548
 
@@ -555,11 +555,11 @@  discard block
 block discarded – undo
555 555
         }
556 556
 
557 557
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
558
-            return $sql . ' ' . $this->platform->getReadLockSQL();
558
+            return $sql.' '.$this->platform->getReadLockSQL();
559 559
         }
560 560
 
561 561
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
562
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
562
+            return $sql.' '.$this->platform->getWriteLockSQL();
563 563
         }
564 564
 
565 565
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
         }
568 568
 
569 569
         foreach ($this->selectedClasses as $selectedClass) {
570
-            if (! $selectedClass['class']->isVersioned()) {
570
+            if ( ! $selectedClass['class']->isVersioned()) {
571 571
                 throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName());
572 572
             }
573 573
         }
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
         foreach ($class->getIdentifierColumns($this->em) as $column) {
617 617
             $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
618 618
 
619
-            $sqlParts[] = $tableAlias . '.' . $quotedColumnName;
619
+            $sqlParts[] = $tableAlias.'.'.$quotedColumnName;
620 620
         }
621 621
 
622 622
         return implode(', ', $sqlParts);
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
     {
635 635
         $class = $this->queryComponents[$identificationVariable]['metadata'];
636 636
 
637
-        if (! $fieldName) {
637
+        if ( ! $fieldName) {
638 638
             return $this->getSQLTableAlias($class->getTableName(), $identificationVariable);
639 639
         }
640 640
 
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
                 $property  = $class->getProperty($fieldName);
664 664
 
665 665
                 if ($this->useSqlTableAliases) {
666
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
666
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
667 667
                 }
668 668
 
669 669
                 $sql .= $this->platform->quoteIdentifier($property->getColumnName());
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
                 $class       = $this->queryComponents[$dqlAlias]['metadata'];
678 678
                 $association = $class->getProperty($fieldName);
679 679
 
680
-                if (! $association->isOwningSide()) {
680
+                if ( ! $association->isOwningSide()) {
681 681
                     throw QueryException::associationPathInverseSideNotSupported($pathExpr);
682 682
                 }
683 683
 
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
                 $joinColumn = reset($joinColumns);
692 692
 
693 693
                 if ($this->useSqlTableAliases) {
694
-                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.';
694
+                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.';
695 695
                 }
696 696
 
697 697
                 $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName());
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
      */
710 710
     public function walkSelectClause($selectClause)
711 711
     {
712
-        $sql                  = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '');
712
+        $sql                  = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : '');
713 713
         $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions));
714 714
 
715 715
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) {
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 
753 753
                 $sqlSelectExpressions[] = sprintf(
754 754
                     '%s AS %s',
755
-                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform),
755
+                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform),
756 756
                     $sqlColumnAlias
757 757
                 );
758 758
 
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
 
763 763
             // Add foreign key columns of class and also parent classes
764 764
             foreach ($class->getDeclaredPropertiesIterator() as $association) {
765
-                if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
765
+                if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
766 766
                     || ( ! $addMetaColumns && ! $association->isPrimaryKey())) {
767 767
                     continue;
768 768
                 }
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
                     $columnAlias          = $this->getSQLColumnAlias();
778 778
                     $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
779 779
 
780
-                    if (! $joinColumn->getType()) {
780
+                    if ( ! $joinColumn->getType()) {
781 781
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
782 782
                     }
783 783
 
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
             }
794 794
 
795 795
             // Add foreign key columns to SQL, if necessary
796
-            if (! $addMetaColumns) {
796
+            if ( ! $addMetaColumns) {
797 797
                 continue;
798 798
             }
799 799
 
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
                         continue;
808 808
                     }
809 809
 
810
-                    if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
810
+                    if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
811 811
                         continue;
812 812
                     }
813 813
 
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
                         $columnAlias          = $this->getSQLColumnAlias();
822 822
                         $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
823 823
 
824
-                        if (! $joinColumn->getType()) {
824
+                        if ( ! $joinColumn->getType()) {
825 825
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
826 826
                         }
827 827
 
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
856 856
         }
857 857
 
858
-        return ' FROM ' . implode(', ', $sqlParts);
858
+        return ' FROM '.implode(', ', $sqlParts);
859 859
     }
860 860
 
861 861
     /**
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
         $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
931 931
 
932 932
         $sql = $this->platform->appendLockHint(
933
-            $tableName . ' ' . $tableAlias,
933
+            $tableName.' '.$tableAlias,
934 934
             $this->query->getHint(Query::HINT_LOCK_MODE)
935 935
         );
936 936
 
@@ -940,11 +940,11 @@  discard block
 block discarded – undo
940 940
 
941 941
         $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias);
942 942
 
943
-        if (! $buildNestedJoins) {
944
-            return $sql . $classTableInheritanceJoins;
943
+        if ( ! $buildNestedJoins) {
944
+            return $sql.$classTableInheritanceJoins;
945 945
         }
946 946
 
947
-        return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')';
947
+        return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')';
948 948
     }
949 949
 
950 950
     /**
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
         ;
982 982
 
983 983
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true &&
984
-            (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
984
+            ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
985 985
             if ($association instanceof ToManyAssociationMetadata) {
986 986
                 throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation);
987 987
             }
@@ -1035,7 +1035,7 @@  discard block
 block discarded – undo
1035 1035
             }
1036 1036
 
1037 1037
             $targetTableJoin = [
1038
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1038
+                'table' => $targetTableName.' '.$targetTableAlias,
1039 1039
                 'condition' => implode(' AND ', $conditions),
1040 1040
             ];
1041 1041
         } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) {
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
                 );
1064 1064
             }
1065 1065
 
1066
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1066
+            $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1067 1067
 
1068 1068
             // Join target table
1069 1069
             $sql .= ($joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
             }
1103 1103
 
1104 1104
             $targetTableJoin = [
1105
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1105
+                'table' => $targetTableName.' '.$targetTableAlias,
1106 1106
                 'condition' => implode(' AND ', $conditions),
1107 1107
             ];
1108 1108
         } else {
@@ -1110,23 +1110,23 @@  discard block
 block discarded – undo
1110 1110
         }
1111 1111
 
1112 1112
         // Handle WITH clause
1113
-        $withCondition = ($condExpr === null) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1113
+        $withCondition = ($condExpr === null) ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1114 1114
 
1115 1115
         if ($targetClass->inheritanceType === InheritanceType::JOINED) {
1116 1116
             $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1117 1117
 
1118 1118
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1119 1119
             if ($withCondition) {
1120
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1120
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1121 1121
             } else {
1122
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1122
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1123 1123
             }
1124 1124
         } else {
1125
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1125
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1126 1126
         }
1127 1127
 
1128 1128
         if ($withCondition) {
1129
-            $sql .= ' AND ' . $withCondition;
1129
+            $sql .= ' AND '.$withCondition;
1130 1130
         }
1131 1131
 
1132 1132
         // Apply the indexes
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1161 1161
         }
1162 1162
 
1163
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1163
+        return ' ORDER BY '.implode(', ', $orderByItems);
1164 1164
     }
1165 1165
 
1166 1166
     /**
@@ -1177,10 +1177,10 @@  discard block
 block discarded – undo
1177 1177
         $this->orderedColumnsMap[$sql] = $type;
1178 1178
 
1179 1179
         if ($expr instanceof AST\Subselect) {
1180
-            return '(' . $sql . ') ' . $type;
1180
+            return '('.$sql.') '.$type;
1181 1181
         }
1182 1182
 
1183
-        return $sql . ' ' . $type;
1183
+        return $sql.' '.$type;
1184 1184
     }
1185 1185
 
1186 1186
     /**
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
      */
1189 1189
     public function walkHavingClause($havingClause)
1190 1190
     {
1191
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1191
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1192 1192
     }
1193 1193
 
1194 1194
     /**
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
                 $conditions = [];
1212 1212
 
1213 1213
                 if ($join->conditionalExpression) {
1214
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1214
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1215 1215
                 }
1216 1216
 
1217 1217
                 $isUnconditionalJoin = empty($conditions);
@@ -1236,7 +1236,7 @@  discard block
 block discarded – undo
1236 1236
                 }
1237 1237
 
1238 1238
                 if ($conditions) {
1239
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1239
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1240 1240
                 }
1241 1241
 
1242 1242
                 break;
@@ -1266,7 +1266,7 @@  discard block
 block discarded – undo
1266 1266
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1267 1267
         }
1268 1268
 
1269
-        $sql .= implode(', ', $scalarExpressions) . ')';
1269
+        $sql .= implode(', ', $scalarExpressions).')';
1270 1270
 
1271 1271
         return $sql;
1272 1272
     }
@@ -1288,7 +1288,7 @@  discard block
 block discarded – undo
1288 1288
             ? $this->conn->quote($nullIfExpression->secondExpression)
1289 1289
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1290 1290
 
1291
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1291
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1292 1292
     }
1293 1293
 
1294 1294
     /**
@@ -1301,11 +1301,11 @@  discard block
 block discarded – undo
1301 1301
         $sql = 'CASE';
1302 1302
 
1303 1303
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1304
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1305
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1304
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1305
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1306 1306
         }
1307 1307
 
1308
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1308
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1309 1309
 
1310 1310
         return $sql;
1311 1311
     }
@@ -1319,14 +1319,14 @@  discard block
 block discarded – undo
1319 1319
      */
1320 1320
     public function walkSimpleCaseExpression($simpleCaseExpression)
1321 1321
     {
1322
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1322
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1323 1323
 
1324 1324
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1325
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1326
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1325
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1326
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1327 1327
         }
1328 1328
 
1329
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1329
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1330 1330
 
1331 1331
         return $sql;
1332 1332
     }
@@ -1367,7 +1367,7 @@  discard block
 block discarded – undo
1367 1367
 
1368 1368
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1369 1369
 
1370
-                if (! $hidden) {
1370
+                if ( ! $hidden) {
1371 1371
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType());
1372 1372
                     $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias;
1373 1373
                 }
@@ -1388,11 +1388,11 @@  discard block
 block discarded – undo
1388 1388
                 $columnAlias = $this->getSQLColumnAlias();
1389 1389
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1390 1390
 
1391
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1391
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1392 1392
 
1393 1393
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1394 1394
 
1395
-                if (! $hidden) {
1395
+                if ( ! $hidden) {
1396 1396
                     // Conceptually we could resolve field type here by traverse through AST to retrieve field type,
1397 1397
                     // but this is not a feasible solution; assume 'string'.
1398 1398
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
@@ -1403,11 +1403,11 @@  discard block
 block discarded – undo
1403 1403
                 $columnAlias = $this->getSQLColumnAlias();
1404 1404
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1405 1405
 
1406
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1406
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1407 1407
 
1408 1408
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1409 1409
 
1410
-                if (! $hidden) {
1410
+                if ( ! $hidden) {
1411 1411
                     // We cannot resolve field type here; assume 'string'.
1412 1412
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
1413 1413
                 }
@@ -1431,7 +1431,7 @@  discard block
 block discarded – undo
1431 1431
                 $class       = $queryComp['metadata'];
1432 1432
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: null;
1433 1433
 
1434
-                if (! isset($this->selectedClasses[$dqlAlias])) {
1434
+                if ( ! isset($this->selectedClasses[$dqlAlias])) {
1435 1435
                     $this->selectedClasses[$dqlAlias] = [
1436 1436
                         'class'       => $class,
1437 1437
                         'dqlAlias'    => $dqlAlias,
@@ -1443,7 +1443,7 @@  discard block
 block discarded – undo
1443 1443
 
1444 1444
                 // Select all fields from the queried class
1445 1445
                 foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) {
1446
-                    if (! ($property instanceof FieldMetadata)) {
1446
+                    if ( ! ($property instanceof FieldMetadata)) {
1447 1447
                         continue;
1448 1448
                     }
1449 1449
 
@@ -1478,7 +1478,7 @@  discard block
 block discarded – undo
1478 1478
                         $subClass = $this->em->getClassMetadata($subClassName);
1479 1479
 
1480 1480
                         foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) {
1481
-                            if (! ($property instanceof FieldMetadata)) {
1481
+                            if ( ! ($property instanceof FieldMetadata)) {
1482 1482
                                 continue;
1483 1483
                             }
1484 1484
 
@@ -1517,7 +1517,7 @@  discard block
 block discarded – undo
1517 1517
      */
1518 1518
     public function walkQuantifiedExpression($qExpr)
1519 1519
     {
1520
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1520
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1521 1521
     }
1522 1522
 
1523 1523
     /**
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1558 1558
         }
1559 1559
 
1560
-        return ' FROM ' . implode(', ', $sqlParts);
1560
+        return ' FROM '.implode(', ', $sqlParts);
1561 1561
     }
1562 1562
 
1563 1563
     /**
@@ -1565,7 +1565,7 @@  discard block
 block discarded – undo
1565 1565
      */
1566 1566
     public function walkSimpleSelectClause($simpleSelectClause)
1567 1567
     {
1568
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1568
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1569 1569
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1570 1570
     }
1571 1571
 
@@ -1587,7 +1587,7 @@  discard block
 block discarded – undo
1587 1587
         $sqlSelectExpressions = [];
1588 1588
 
1589 1589
         $objOwner = $objOwnerIdx = null;
1590
-        if (!empty($this->newObjectStack)) {
1590
+        if ( ! empty($this->newObjectStack)) {
1591 1591
             [$objOwner, $objOwnerIdx] = end($this->newObjectStack);
1592 1592
             $objIndex = "$objOwner:$objOwnerIdx";
1593 1593
         } else {
@@ -1608,7 +1608,7 @@  discard block
 block discarded – undo
1608 1608
                     break;
1609 1609
 
1610 1610
                 case ($e instanceof AST\Subselect):
1611
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1611
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1612 1612
                     break;
1613 1613
 
1614 1614
                 case ($e instanceof AST\PathExpression):
@@ -1617,7 +1617,7 @@  discard block
 block discarded – undo
1617 1617
                     $class     = $qComp['metadata'];
1618 1618
                     $fieldType = $class->getProperty($e->field)->getType();
1619 1619
 
1620
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1620
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1621 1621
                     break;
1622 1622
 
1623 1623
                 case ($e instanceof AST\Literal):
@@ -1631,11 +1631,11 @@  discard block
 block discarded – undo
1631 1631
                             break;
1632 1632
                     }
1633 1633
 
1634
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1634
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1635 1635
                     break;
1636 1636
 
1637 1637
                 default:
1638
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1638
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1639 1639
                     break;
1640 1640
             }
1641 1641
 
@@ -1672,10 +1672,10 @@  discard block
 block discarded – undo
1672 1672
             case ($expr instanceof AST\Subselect):
1673 1673
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1674 1674
 
1675
-                $columnAlias                        = 'sclr' . $this->aliasCounter++;
1675
+                $columnAlias                        = 'sclr'.$this->aliasCounter++;
1676 1676
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1677 1677
 
1678
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1678
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1679 1679
                 break;
1680 1680
 
1681 1681
             case ($expr instanceof AST\Functions\FunctionNode):
@@ -1692,7 +1692,7 @@  discard block
 block discarded – undo
1692 1692
                 $columnAlias                        = $this->getSQLColumnAlias();
1693 1693
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1694 1694
 
1695
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1695
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1696 1696
                 break;
1697 1697
 
1698 1698
             case ($expr instanceof AST\ParenthesisExpression):
@@ -1712,8 +1712,8 @@  discard block
 block discarded – undo
1712 1712
      */
1713 1713
     public function walkAggregateExpression($aggExpression)
1714 1714
     {
1715
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1716
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1715
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1716
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1717 1717
     }
1718 1718
 
1719 1719
     /**
@@ -1727,7 +1727,7 @@  discard block
 block discarded – undo
1727 1727
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1728 1728
         }
1729 1729
 
1730
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1730
+        return ' GROUP BY '.implode(', ', $sqlParts);
1731 1731
     }
1732 1732
 
1733 1733
     /**
@@ -1736,7 +1736,7 @@  discard block
 block discarded – undo
1736 1736
     public function walkGroupByItem($groupByItem)
1737 1737
     {
1738 1738
         // StateFieldPathExpression
1739
-        if (! is_string($groupByItem)) {
1739
+        if ( ! is_string($groupByItem)) {
1740 1740
             return $this->walkPathExpression($groupByItem);
1741 1741
         }
1742 1742
 
@@ -1790,7 +1790,7 @@  discard block
 block discarded – undo
1790 1790
     {
1791 1791
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1792 1792
         $tableName = $class->getTableName();
1793
-        $sql       = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform);
1793
+        $sql       = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform);
1794 1794
 
1795 1795
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1796 1796
 
@@ -1806,12 +1806,12 @@  discard block
 block discarded – undo
1806 1806
     {
1807 1807
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1808 1808
         $tableName = $class->getTableName();
1809
-        $sql       = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform);
1809
+        $sql       = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform);
1810 1810
 
1811 1811
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1812 1812
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1813 1813
 
1814
-        $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1814
+        $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1815 1815
 
1816 1816
         return $sql;
1817 1817
     }
@@ -1824,7 +1824,7 @@  discard block
 block discarded – undo
1824 1824
         $useTableAliasesBefore    = $this->useSqlTableAliases;
1825 1825
         $this->useSqlTableAliases = false;
1826 1826
 
1827
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1827
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1828 1828
         $newValue = $updateItem->newValue;
1829 1829
 
1830 1830
         switch (true) {
@@ -1868,7 +1868,7 @@  discard block
 block discarded – undo
1868 1868
 
1869 1869
             if ($filterClauses) {
1870 1870
                 if ($condSql) {
1871
-                    $condSql = '(' . $condSql . ') AND ';
1871
+                    $condSql = '('.$condSql.') AND ';
1872 1872
                 }
1873 1873
 
1874 1874
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1876,11 +1876,11 @@  discard block
 block discarded – undo
1876 1876
         }
1877 1877
 
1878 1878
         if ($condSql) {
1879
-            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1879
+            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql);
1880 1880
         }
1881 1881
 
1882 1882
         if ($discrSql) {
1883
-            return ' WHERE ' . $discrSql;
1883
+            return ' WHERE '.$discrSql;
1884 1884
         }
1885 1885
 
1886 1886
         return '';
@@ -1893,7 +1893,7 @@  discard block
 block discarded – undo
1893 1893
     {
1894 1894
         // Phase 2 AST optimization: Skip processing of ConditionalExpression
1895 1895
         // if only one ConditionalTerm is defined
1896
-        if (! ($condExpr instanceof AST\ConditionalExpression)) {
1896
+        if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
1897 1897
             return $this->walkConditionalTerm($condExpr);
1898 1898
         }
1899 1899
 
@@ -1907,7 +1907,7 @@  discard block
 block discarded – undo
1907 1907
     {
1908 1908
         // Phase 2 AST optimization: Skip processing of ConditionalTerm
1909 1909
         // if only one ConditionalFactor is defined
1910
-        if (! ($condTerm instanceof AST\ConditionalTerm)) {
1910
+        if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
1911 1911
             return $this->walkConditionalFactor($condTerm);
1912 1912
         }
1913 1913
 
@@ -1923,7 +1923,7 @@  discard block
 block discarded – undo
1923 1923
         // if only one ConditionalPrimary is defined
1924 1924
         return ( ! ($factor instanceof AST\ConditionalFactor))
1925 1925
             ? $this->walkConditionalPrimary($factor)
1926
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1926
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1927 1927
     }
1928 1928
 
1929 1929
     /**
@@ -1938,7 +1938,7 @@  discard block
 block discarded – undo
1938 1938
         if ($primary->isConditionalExpression()) {
1939 1939
             $condExpr = $primary->conditionalExpression;
1940 1940
 
1941
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1941
+            return '('.$this->walkConditionalExpression($condExpr).')';
1942 1942
         }
1943 1943
     }
1944 1944
 
@@ -1949,7 +1949,7 @@  discard block
 block discarded – undo
1949 1949
     {
1950 1950
         $sql = ($existsExpr->not) ? 'NOT ' : '';
1951 1951
 
1952
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1952
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1953 1953
 
1954 1954
         return $sql;
1955 1955
     }
@@ -1998,7 +1998,7 @@  discard block
 block discarded – undo
1998 1998
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1999 1999
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
2000 2000
 
2001
-            $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE ';
2001
+            $sql .= $targetTableName.' '.$targetTableAlias.' WHERE ';
2002 2002
 
2003 2003
             $sqlParts = [];
2004 2004
 
@@ -2019,7 +2019,7 @@  discard block
 block discarded – undo
2019 2019
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2020 2020
                 }
2021 2021
 
2022
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2022
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2023 2023
             }
2024 2024
 
2025 2025
             $sql .= implode(' AND ', $sqlParts);
@@ -2033,7 +2033,7 @@  discard block
 block discarded – undo
2033 2033
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
2034 2034
 
2035 2035
             // join to target table
2036
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON ';
2036
+            $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON ';
2037 2037
 
2038 2038
             // join conditions
2039 2039
             $joinSqlParts = [];
@@ -2084,13 +2084,13 @@  discard block
 block discarded – undo
2084 2084
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2085 2085
                 }
2086 2086
 
2087
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2087
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2088 2088
             }
2089 2089
 
2090 2090
             $sql .= implode(' AND ', $sqlParts);
2091 2091
         }
2092 2092
 
2093
-        return $sql . ')';
2093
+        return $sql.')';
2094 2094
     }
2095 2095
 
2096 2096
     /**
@@ -2101,7 +2101,7 @@  discard block
 block discarded – undo
2101 2101
         $sizeFunc                           = new AST\Functions\SizeFunction('size');
2102 2102
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2103 2103
 
2104
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2104
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2105 2105
     }
2106 2106
 
2107 2107
     /**
@@ -2110,19 +2110,19 @@  discard block
 block discarded – undo
2110 2110
     public function walkNullComparisonExpression($nullCompExpr)
2111 2111
     {
2112 2112
         $expression = $nullCompExpr->expression;
2113
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2113
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2114 2114
 
2115 2115
         // Handle ResultVariable
2116 2116
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2117
-            return $this->walkResultVariable($expression) . $comparison;
2117
+            return $this->walkResultVariable($expression).$comparison;
2118 2118
         }
2119 2119
 
2120 2120
         // Handle InputParameter mapping inclusion to ParserResult
2121 2121
         if ($expression instanceof AST\InputParameter) {
2122
-            return $this->walkInputParameter($expression) . $comparison;
2122
+            return $this->walkInputParameter($expression).$comparison;
2123 2123
         }
2124 2124
 
2125
-        return $expression->dispatch($this) . $comparison;
2125
+        return $expression->dispatch($this).$comparison;
2126 2126
     }
2127 2127
 
2128 2128
     /**
@@ -2130,7 +2130,7 @@  discard block
 block discarded – undo
2130 2130
      */
2131 2131
     public function walkInExpression($inExpr)
2132 2132
     {
2133
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2133
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2134 2134
 
2135 2135
         $sql .= ($inExpr->subselect)
2136 2136
             ? $this->walkSubselect($inExpr->subselect)
@@ -2154,12 +2154,12 @@  discard block
 block discarded – undo
2154 2154
         $discrColumnType  = $discrColumn->getType();
2155 2155
         $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
2156 2156
         $sqlTableAlias    = $this->useSqlTableAliases
2157
-            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
2157
+            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
2158 2158
             : '';
2159 2159
 
2160 2160
         return sprintf(
2161 2161
             '%s %sIN %s',
2162
-            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
2162
+            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
2163 2163
             ($instanceOfExpr->not ? 'NOT ' : ''),
2164 2164
             $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr)
2165 2165
         );
@@ -2206,8 +2206,8 @@  discard block
 block discarded – undo
2206 2206
             $sql .= ' NOT';
2207 2207
         }
2208 2208
 
2209
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2210
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2209
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2210
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2211 2211
 
2212 2212
         return $sql;
2213 2213
     }
@@ -2222,7 +2222,7 @@  discard block
 block discarded – undo
2222 2222
             ? $this->walkResultVariable($stringExpr)
2223 2223
             : $stringExpr->dispatch($this);
2224 2224
 
2225
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2225
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2226 2226
 
2227 2227
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2228 2228
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2235,7 +2235,7 @@  discard block
 block discarded – undo
2235 2235
         }
2236 2236
 
2237 2237
         if ($likeExpr->escapeChar) {
2238
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2238
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2239 2239
         }
2240 2240
 
2241 2241
         return $sql;
@@ -2262,7 +2262,7 @@  discard block
 block discarded – undo
2262 2262
             ? $leftExpr->dispatch($this)
2263 2263
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2264 2264
 
2265
-        $sql .= ' ' . $compExpr->operator . ' ';
2265
+        $sql .= ' '.$compExpr->operator.' ';
2266 2266
 
2267 2267
         $sql .= ($rightExpr instanceof AST\Node)
2268 2268
             ? $rightExpr->dispatch($this)
@@ -2298,7 +2298,7 @@  discard block
 block discarded – undo
2298 2298
     {
2299 2299
         return ($arithmeticExpr->isSimpleArithmeticExpression())
2300 2300
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2301
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2301
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2302 2302
     }
2303 2303
 
2304 2304
     /**
@@ -2306,7 +2306,7 @@  discard block
 block discarded – undo
2306 2306
      */
2307 2307
     public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
2308 2308
     {
2309
-        if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2309
+        if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2310 2310
             return $this->walkArithmeticTerm($simpleArithmeticExpr);
2311 2311
         }
2312 2312
 
@@ -2326,7 +2326,7 @@  discard block
 block discarded – undo
2326 2326
 
2327 2327
         // Phase 2 AST optimization: Skip processing of ArithmeticTerm
2328 2328
         // if only one ArithmeticFactor is defined
2329
-        if (! ($term instanceof AST\ArithmeticTerm)) {
2329
+        if ( ! ($term instanceof AST\ArithmeticTerm)) {
2330 2330
             return $this->walkArithmeticFactor($term);
2331 2331
         }
2332 2332
 
@@ -2346,13 +2346,13 @@  discard block
 block discarded – undo
2346 2346
 
2347 2347
         // Phase 2 AST optimization: Skip processing of ArithmeticFactor
2348 2348
         // if only one ArithmeticPrimary is defined
2349
-        if (! ($factor instanceof AST\ArithmeticFactor)) {
2349
+        if ( ! ($factor instanceof AST\ArithmeticFactor)) {
2350 2350
             return $this->walkArithmeticPrimary($factor);
2351 2351
         }
2352 2352
 
2353 2353
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2354 2354
 
2355
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2355
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2356 2356
     }
2357 2357
 
2358 2358
     /**
@@ -2365,7 +2365,7 @@  discard block
 block discarded – undo
2365 2365
     public function walkArithmeticPrimary($primary)
2366 2366
     {
2367 2367
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2368
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2368
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2369 2369
         }
2370 2370
 
2371 2371
         if ($primary instanceof AST\Node) {
@@ -2424,7 +2424,7 @@  discard block
 block discarded – undo
2424 2424
             $entityClassName = $entityClass->getClassName();
2425 2425
 
2426 2426
             if ($entityClassName !== $rootClass->getClassName()) {
2427
-                if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2427
+                if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2428 2428
                     throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName());
2429 2429
                 }
2430 2430
             }
@@ -2436,6 +2436,6 @@  discard block
 block discarded – undo
2436 2436
             $sqlParameterList[] = $this->conn->quote($discriminator);
2437 2437
         }
2438 2438
 
2439
-        return '(' . implode(', ', $sqlParameterList) . ')';
2439
+        return '('.implode(', ', $sqlParameterList).')';
2440 2440
     }
2441 2441
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/ResultSetMapping.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\ORM\Query;
6 6
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         $found = false;
228 228
 
229 229
         foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) {
230
-            if (! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) {
230
+            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) {
231 231
                 continue;
232 232
             }
233 233
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         // field name => class name of declaring class
337 337
         $this->declaringClasses[$columnName] = $declaringClass ?: $this->aliasMap[$alias];
338 338
 
339
-        if (! $this->isMixed && $this->scalarMappings) {
339
+        if ( ! $this->isMixed && $this->scalarMappings) {
340 340
             $this->isMixed = true;
341 341
         }
342 342
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         $this->scalarMappings[$columnName] = $alias;
382 382
         $this->typeMappings[$columnName]   = $type;
383 383
 
384
-        if (! $this->isMixed && $this->fieldMappings) {
384
+        if ( ! $this->isMixed && $this->fieldMappings) {
385 385
             $this->isMixed = true;
386 386
         }
387 387
 
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
             'argIndex' => $objOwnerIdx,
571 571
         ];
572 572
 
573
-        if (!isset($this->nestedNewObjectArguments[$owner['ownerIndex']])) {
573
+        if ( ! isset($this->nestedNewObjectArguments[$owner['ownerIndex']])) {
574 574
             $this->nestedNewObjectArguments[$alias] = $owner;
575 575
 
576 576
             return;
Please login to merge, or discard this patch.