Failed Conditions
Pull Request — master (#7825)
by
unknown
65:47 queued 01:43
created
tests/Doctrine/Tests/ORM/Functional/Ticket/GH5998Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         self::assertNotNull($child);
51 51
 
52 52
         // Test lock and update
53
-        $this->em->transactional(static function ($em) use ($child) {
53
+        $this->em->transactional(static function($em) use ($child) {
54 54
             $em->lock($child, LockMode::NONE);
55 55
             $child->firstName = 'Bob';
56 56
             $child->status    = 0;
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
@@ -270,10 +270,10 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function getSQLTableAlias($tableName, $dqlAlias = '')
272 272
     {
273
-        $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : '';
273
+        $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : '';
274 274
 
275
-        if (! isset($this->tableAliasMap[$tableName])) {
276
-            $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++;
275
+        if ( ! isset($this->tableAliasMap[$tableName])) {
276
+            $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++;
277 277
         }
278 278
 
279 279
         return $this->tableAliasMap[$tableName];
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      */
292 292
     public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')
293 293
     {
294
-        $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : '';
294
+        $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : '';
295 295
 
296 296
         $this->tableAliasMap[$tableName] = $alias;
297 297
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
      */
306 306
     public function getSQLColumnAlias()
307 307
     {
308
-        return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++);
308
+        return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++);
309 309
     }
310 310
 
311 311
     /**
@@ -327,20 +327,20 @@  discard block
 block discarded – undo
327 327
         $parentClass = $class;
328 328
 
329 329
         while (($parentClass = $parentClass->getParent()) !== null) {
330
-            if (! $parentClass->isMappedSuperclass) {
330
+            if ( ! $parentClass->isMappedSuperclass) {
331 331
                 $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
332 332
                 $tableAlias = $this->getSQLTableAlias($parentClass->getTableName(), $dqlAlias);
333 333
 
334 334
                 // If this is a joined association we must use left joins to preserve the correct result.
335 335
                 $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER ';
336
-                $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
336
+                $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON ';
337 337
 
338 338
                 $sqlParts = [];
339 339
 
340 340
                 foreach ($class->getIdentifierColumns($this->em) as $column) {
341 341
                     $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
342 342
 
343
-                    $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
343
+                    $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
344 344
                 }
345 345
 
346 346
                 $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->getPropertiesIterator() 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
 
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
             }
839 839
         }
840 840
 
841
-        return $sql . implode(', ', $sqlSelectExpressions);
841
+        return $sql.implode(', ', $sqlSelectExpressions);
842 842
     }
843 843
 
844 844
     /**
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
854 854
         }
855 855
 
856
-        return ' FROM ' . implode(', ', $sqlParts);
856
+        return ' FROM '.implode(', ', $sqlParts);
857 857
     }
858 858
 
859 859
     /**
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
         $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
929 929
 
930 930
         $sql = $this->platform->appendLockHint(
931
-            $tableName . ' ' . $tableAlias,
931
+            $tableName.' '.$tableAlias,
932 932
             $this->query->getHint(Query::HINT_LOCK_MODE)
933 933
         );
934 934
 
@@ -938,11 +938,11 @@  discard block
 block discarded – undo
938 938
 
939 939
         $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias);
940 940
 
941
-        if (! $buildNestedJoins) {
942
-            return $sql . $classTableInheritanceJoins;
941
+        if ( ! $buildNestedJoins) {
942
+            return $sql.$classTableInheritanceJoins;
943 943
         }
944 944
 
945
-        return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')';
945
+        return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')';
946 946
     }
947 947
 
948 948
     /**
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
             : $association;
979 979
 
980 980
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true &&
981
-            (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
981
+            ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
982 982
             if ($association instanceof ToManyAssociationMetadata) {
983 983
                 throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation);
984 984
             }
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
             }
1033 1033
 
1034 1034
             $targetTableJoin = [
1035
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1035
+                'table' => $targetTableName.' '.$targetTableAlias,
1036 1036
                 'condition' => implode(' AND ', $conditions),
1037 1037
             ];
1038 1038
         } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) {
@@ -1059,7 +1059,7 @@  discard block
 block discarded – undo
1059 1059
                 );
1060 1060
             }
1061 1061
 
1062
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1062
+            $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1063 1063
 
1064 1064
             // Join target table
1065 1065
             $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
             }
1098 1098
 
1099 1099
             $targetTableJoin = [
1100
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1100
+                'table' => $targetTableName.' '.$targetTableAlias,
1101 1101
                 'condition' => implode(' AND ', $conditions),
1102 1102
             ];
1103 1103
         } else {
@@ -1105,23 +1105,23 @@  discard block
 block discarded – undo
1105 1105
         }
1106 1106
 
1107 1107
         // Handle WITH clause
1108
-        $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1108
+        $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1109 1109
 
1110 1110
         if ($targetClass->inheritanceType === InheritanceType::JOINED) {
1111 1111
             $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1112 1112
 
1113 1113
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1114 1114
             if ($withCondition) {
1115
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1115
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1116 1116
             } else {
1117
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1117
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1118 1118
             }
1119 1119
         } else {
1120
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1120
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1121 1121
         }
1122 1122
 
1123 1123
         if ($withCondition) {
1124
-            $sql .= ' AND ' . $withCondition;
1124
+            $sql .= ' AND '.$withCondition;
1125 1125
         }
1126 1126
 
1127 1127
         // Apply the indexes
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1156 1156
         }
1157 1157
 
1158
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1158
+        return ' ORDER BY '.implode(', ', $orderByItems);
1159 1159
     }
1160 1160
 
1161 1161
     /**
@@ -1172,10 +1172,10 @@  discard block
 block discarded – undo
1172 1172
         $this->orderedColumnsMap[$sql] = $type;
1173 1173
 
1174 1174
         if ($expr instanceof AST\Subselect) {
1175
-            return '(' . $sql . ') ' . $type;
1175
+            return '('.$sql.') '.$type;
1176 1176
         }
1177 1177
 
1178
-        return $sql . ' ' . $type;
1178
+        return $sql.' '.$type;
1179 1179
     }
1180 1180
 
1181 1181
     /**
@@ -1183,7 +1183,7 @@  discard block
 block discarded – undo
1183 1183
      */
1184 1184
     public function walkHavingClause($havingClause)
1185 1185
     {
1186
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1186
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1187 1187
     }
1188 1188
 
1189 1189
     /**
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
                 $conditions = [];
1207 1207
 
1208 1208
                 if ($join->conditionalExpression) {
1209
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1209
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1210 1210
                 }
1211 1211
 
1212 1212
                 $isUnconditionalJoin = empty($conditions);
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
                 }
1232 1232
 
1233 1233
                 if ($conditions) {
1234
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1234
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1235 1235
                 }
1236 1236
 
1237 1237
                 break;
@@ -1261,7 +1261,7 @@  discard block
 block discarded – undo
1261 1261
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1262 1262
         }
1263 1263
 
1264
-        return $sql . implode(', ', $scalarExpressions) . ')';
1264
+        return $sql.implode(', ', $scalarExpressions).')';
1265 1265
     }
1266 1266
 
1267 1267
     /**
@@ -1281,7 +1281,7 @@  discard block
 block discarded – undo
1281 1281
             ? $this->conn->quote($nullIfExpression->secondExpression)
1282 1282
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1283 1283
 
1284
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1284
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1285 1285
     }
1286 1286
 
1287 1287
     /**
@@ -1294,11 +1294,11 @@  discard block
 block discarded – undo
1294 1294
         $sql = 'CASE';
1295 1295
 
1296 1296
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1297
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1298
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1297
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1298
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1299 1299
         }
1300 1300
 
1301
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1301
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1302 1302
 
1303 1303
         return $sql;
1304 1304
     }
@@ -1312,14 +1312,14 @@  discard block
 block discarded – undo
1312 1312
      */
1313 1313
     public function walkSimpleCaseExpression($simpleCaseExpression)
1314 1314
     {
1315
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1315
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1316 1316
 
1317 1317
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1318
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1319
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1318
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1319
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1320 1320
         }
1321 1321
 
1322
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1322
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1323 1323
 
1324 1324
         return $sql;
1325 1325
     }
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
 
1361 1361
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1362 1362
 
1363
-                if (! $hidden) {
1363
+                if ( ! $hidden) {
1364 1364
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType());
1365 1365
                     $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias;
1366 1366
                 }
@@ -1381,11 +1381,11 @@  discard block
 block discarded – undo
1381 1381
                 $columnAlias = $this->getSQLColumnAlias();
1382 1382
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1383 1383
 
1384
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1384
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1385 1385
 
1386 1386
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1387 1387
 
1388
-                if (! $hidden) {
1388
+                if ( ! $hidden) {
1389 1389
                     // Conceptually we could resolve field type here by traverse through AST to retrieve field type,
1390 1390
                     // but this is not a feasible solution; assume 'string'.
1391 1391
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
@@ -1396,11 +1396,11 @@  discard block
 block discarded – undo
1396 1396
                 $columnAlias = $this->getSQLColumnAlias();
1397 1397
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1398 1398
 
1399
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1399
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1400 1400
 
1401 1401
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1402 1402
 
1403
-                if (! $hidden) {
1403
+                if ( ! $hidden) {
1404 1404
                     // We cannot resolve field type here; assume 'string'.
1405 1405
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
1406 1406
                 }
@@ -1424,7 +1424,7 @@  discard block
 block discarded – undo
1424 1424
                 $class       = $queryComp['metadata'];
1425 1425
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: null;
1426 1426
 
1427
-                if (! isset($this->selectedClasses[$dqlAlias])) {
1427
+                if ( ! isset($this->selectedClasses[$dqlAlias])) {
1428 1428
                     $this->selectedClasses[$dqlAlias] = [
1429 1429
                         'class'       => $class,
1430 1430
                         'dqlAlias'    => $dqlAlias,
@@ -1436,7 +1436,7 @@  discard block
 block discarded – undo
1436 1436
 
1437 1437
                 // Select all fields from the queried class
1438 1438
                 foreach ($class->getPropertiesIterator() as $fieldName => $property) {
1439
-                    if (! ($property instanceof FieldMetadata)) {
1439
+                    if ( ! ($property instanceof FieldMetadata)) {
1440 1440
                         continue;
1441 1441
                     }
1442 1442
 
@@ -1471,7 +1471,7 @@  discard block
 block discarded – undo
1471 1471
                         $subClass = $this->em->getClassMetadata($subClassName);
1472 1472
 
1473 1473
                         foreach ($subClass->getPropertiesIterator() as $fieldName => $property) {
1474
-                            if (! ($property instanceof FieldMetadata)) {
1474
+                            if ( ! ($property instanceof FieldMetadata)) {
1475 1475
                                 continue;
1476 1476
                             }
1477 1477
 
@@ -1510,7 +1510,7 @@  discard block
 block discarded – undo
1510 1510
      */
1511 1511
     public function walkQuantifiedExpression($qExpr)
1512 1512
     {
1513
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1513
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1514 1514
     }
1515 1515
 
1516 1516
     /**
@@ -1550,7 +1550,7 @@  discard block
 block discarded – undo
1550 1550
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1551 1551
         }
1552 1552
 
1553
-        return ' FROM ' . implode(', ', $sqlParts);
1553
+        return ' FROM '.implode(', ', $sqlParts);
1554 1554
     }
1555 1555
 
1556 1556
     /**
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
      */
1559 1559
     public function walkSimpleSelectClause($simpleSelectClause)
1560 1560
     {
1561
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1561
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1562 1562
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1563 1563
     }
1564 1564
 
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
                     break;
1593 1593
 
1594 1594
                 case $e instanceof AST\Subselect:
1595
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1595
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1596 1596
                     break;
1597 1597
 
1598 1598
                 case $e instanceof AST\PathExpression:
@@ -1601,7 +1601,7 @@  discard block
 block discarded – undo
1601 1601
                     $class     = $qComp['metadata'];
1602 1602
                     $fieldType = $class->getProperty($e->field)->getType();
1603 1603
 
1604
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1604
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1605 1605
                     break;
1606 1606
 
1607 1607
                 case $e instanceof AST\Literal:
@@ -1615,11 +1615,11 @@  discard block
 block discarded – undo
1615 1615
                             break;
1616 1616
                     }
1617 1617
 
1618
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1618
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1619 1619
                     break;
1620 1620
 
1621 1621
                 default:
1622
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1622
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1623 1623
                     break;
1624 1624
             }
1625 1625
 
@@ -1652,10 +1652,10 @@  discard block
 block discarded – undo
1652 1652
             case $expr instanceof AST\Subselect:
1653 1653
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1654 1654
 
1655
-                $columnAlias                        = 'sclr' . $this->aliasCounter++;
1655
+                $columnAlias                        = 'sclr'.$this->aliasCounter++;
1656 1656
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1657 1657
 
1658
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1658
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1659 1659
                 break;
1660 1660
 
1661 1661
             case $expr instanceof AST\Functions\FunctionNode:
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
                 $columnAlias                        = $this->getSQLColumnAlias();
1673 1673
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1674 1674
 
1675
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1675
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1676 1676
                 break;
1677 1677
 
1678 1678
             case $expr instanceof AST\ParenthesisExpression:
@@ -1692,8 +1692,8 @@  discard block
 block discarded – undo
1692 1692
      */
1693 1693
     public function walkAggregateExpression($aggExpression)
1694 1694
     {
1695
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1696
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1695
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1696
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1697 1697
     }
1698 1698
 
1699 1699
     /**
@@ -1707,7 +1707,7 @@  discard block
 block discarded – undo
1707 1707
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1708 1708
         }
1709 1709
 
1710
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1710
+        return ' GROUP BY '.implode(', ', $sqlParts);
1711 1711
     }
1712 1712
 
1713 1713
     /**
@@ -1716,7 +1716,7 @@  discard block
 block discarded – undo
1716 1716
     public function walkGroupByItem($groupByItem)
1717 1717
     {
1718 1718
         // StateFieldPathExpression
1719
-        if (! is_string($groupByItem)) {
1719
+        if ( ! is_string($groupByItem)) {
1720 1720
             return $this->walkPathExpression($groupByItem);
1721 1721
         }
1722 1722
 
@@ -1770,7 +1770,7 @@  discard block
 block discarded – undo
1770 1770
     {
1771 1771
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1772 1772
         $tableName = $class->getTableName();
1773
-        $sql       = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform);
1773
+        $sql       = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform);
1774 1774
 
1775 1775
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1776 1776
 
@@ -1786,12 +1786,12 @@  discard block
 block discarded – undo
1786 1786
     {
1787 1787
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1788 1788
         $tableName = $class->getTableName();
1789
-        $sql       = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform);
1789
+        $sql       = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform);
1790 1790
 
1791 1791
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1792 1792
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1793 1793
 
1794
-        return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1794
+        return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1795 1795
     }
1796 1796
 
1797 1797
     /**
@@ -1802,7 +1802,7 @@  discard block
 block discarded – undo
1802 1802
         $useTableAliasesBefore    = $this->useSqlTableAliases;
1803 1803
         $this->useSqlTableAliases = false;
1804 1804
 
1805
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1805
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1806 1806
         $newValue = $updateItem->newValue;
1807 1807
 
1808 1808
         switch (true) {
@@ -1846,7 +1846,7 @@  discard block
 block discarded – undo
1846 1846
 
1847 1847
             if ($filterClauses) {
1848 1848
                 if ($condSql) {
1849
-                    $condSql = '(' . $condSql . ') AND ';
1849
+                    $condSql = '('.$condSql.') AND ';
1850 1850
                 }
1851 1851
 
1852 1852
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1854,11 +1854,11 @@  discard block
 block discarded – undo
1854 1854
         }
1855 1855
 
1856 1856
         if ($condSql) {
1857
-            return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1857
+            return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql);
1858 1858
         }
1859 1859
 
1860 1860
         if ($discrSql) {
1861
-            return ' WHERE ' . $discrSql;
1861
+            return ' WHERE '.$discrSql;
1862 1862
         }
1863 1863
 
1864 1864
         return '';
@@ -1871,7 +1871,7 @@  discard block
 block discarded – undo
1871 1871
     {
1872 1872
         // Phase 2 AST optimization: Skip processing of ConditionalExpression
1873 1873
         // if only one ConditionalTerm is defined
1874
-        if (! ($condExpr instanceof AST\ConditionalExpression)) {
1874
+        if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
1875 1875
             return $this->walkConditionalTerm($condExpr);
1876 1876
         }
1877 1877
 
@@ -1885,7 +1885,7 @@  discard block
 block discarded – undo
1885 1885
     {
1886 1886
         // Phase 2 AST optimization: Skip processing of ConditionalTerm
1887 1887
         // if only one ConditionalFactor is defined
1888
-        if (! ($condTerm instanceof AST\ConditionalTerm)) {
1888
+        if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
1889 1889
             return $this->walkConditionalFactor($condTerm);
1890 1890
         }
1891 1891
 
@@ -1901,7 +1901,7 @@  discard block
 block discarded – undo
1901 1901
         // if only one ConditionalPrimary is defined
1902 1902
         return ! ($factor instanceof AST\ConditionalFactor)
1903 1903
             ? $this->walkConditionalPrimary($factor)
1904
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1904
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1905 1905
     }
1906 1906
 
1907 1907
     /**
@@ -1916,7 +1916,7 @@  discard block
 block discarded – undo
1916 1916
         if ($primary->isConditionalExpression()) {
1917 1917
             $condExpr = $primary->conditionalExpression;
1918 1918
 
1919
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1919
+            return '('.$this->walkConditionalExpression($condExpr).')';
1920 1920
         }
1921 1921
 
1922 1922
         return '';
@@ -1929,7 +1929,7 @@  discard block
 block discarded – undo
1929 1929
     {
1930 1930
         $sql = $existsExpr->not ? 'NOT ' : '';
1931 1931
 
1932
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1932
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1933 1933
 
1934 1934
         return $sql;
1935 1935
     }
@@ -1977,7 +1977,7 @@  discard block
 block discarded – undo
1977 1977
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1978 1978
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1979 1979
 
1980
-            $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE ';
1980
+            $sql .= $targetTableName.' '.$targetTableAlias.' WHERE ';
1981 1981
 
1982 1982
             $sqlParts = [];
1983 1983
 
@@ -1998,7 +1998,7 @@  discard block
 block discarded – undo
1998 1998
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1999 1999
                 }
2000 2000
 
2001
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2001
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2002 2002
             }
2003 2003
 
2004 2004
             $sql .= implode(' AND ', $sqlParts);
@@ -2012,7 +2012,7 @@  discard block
 block discarded – undo
2012 2012
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
2013 2013
 
2014 2014
             // join to target table
2015
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON ';
2015
+            $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON ';
2016 2016
 
2017 2017
             // join conditions
2018 2018
             $joinSqlParts = [];
@@ -2061,13 +2061,13 @@  discard block
 block discarded – undo
2061 2061
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2062 2062
                 }
2063 2063
 
2064
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2064
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2065 2065
             }
2066 2066
 
2067 2067
             $sql .= implode(' AND ', $sqlParts);
2068 2068
         }
2069 2069
 
2070
-        return $sql . ')';
2070
+        return $sql.')';
2071 2071
     }
2072 2072
 
2073 2073
     /**
@@ -2078,7 +2078,7 @@  discard block
 block discarded – undo
2078 2078
         $sizeFunc                           = new AST\Functions\SizeFunction('size');
2079 2079
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2080 2080
 
2081
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2081
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2082 2082
     }
2083 2083
 
2084 2084
     /**
@@ -2087,19 +2087,19 @@  discard block
 block discarded – undo
2087 2087
     public function walkNullComparisonExpression($nullCompExpr)
2088 2088
     {
2089 2089
         $expression = $nullCompExpr->expression;
2090
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2090
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2091 2091
 
2092 2092
         // Handle ResultVariable
2093 2093
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2094
-            return $this->walkResultVariable($expression) . $comparison;
2094
+            return $this->walkResultVariable($expression).$comparison;
2095 2095
         }
2096 2096
 
2097 2097
         // Handle InputParameter mapping inclusion to ParserResult
2098 2098
         if ($expression instanceof AST\InputParameter) {
2099
-            return $this->walkInputParameter($expression) . $comparison;
2099
+            return $this->walkInputParameter($expression).$comparison;
2100 2100
         }
2101 2101
 
2102
-        return $expression->dispatch($this) . $comparison;
2102
+        return $expression->dispatch($this).$comparison;
2103 2103
     }
2104 2104
 
2105 2105
     /**
@@ -2107,7 +2107,7 @@  discard block
 block discarded – undo
2107 2107
      */
2108 2108
     public function walkInExpression($inExpr)
2109 2109
     {
2110
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2110
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2111 2111
 
2112 2112
         $sql .= $inExpr->subselect
2113 2113
             ? $this->walkSubselect($inExpr->subselect)
@@ -2132,12 +2132,12 @@  discard block
 block discarded – undo
2132 2132
         $discrColumnType  = $discrColumn->getType();
2133 2133
         $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
2134 2134
         $sqlTableAlias    = $this->useSqlTableAliases
2135
-            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
2135
+            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
2136 2136
             : '';
2137 2137
 
2138 2138
         return sprintf(
2139 2139
             '%s %sIN %s',
2140
-            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
2140
+            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
2141 2141
             ($instanceOfExpr->not ? 'NOT ' : ''),
2142 2142
             $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr)
2143 2143
         );
@@ -2181,8 +2181,8 @@  discard block
 block discarded – undo
2181 2181
             $sql .= ' NOT';
2182 2182
         }
2183 2183
 
2184
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2185
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2184
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2185
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2186 2186
 
2187 2187
         return $sql;
2188 2188
     }
@@ -2197,7 +2197,7 @@  discard block
 block discarded – undo
2197 2197
             ? $this->walkResultVariable($stringExpr)
2198 2198
             : $stringExpr->dispatch($this);
2199 2199
 
2200
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2200
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2201 2201
 
2202 2202
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2203 2203
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2210,7 +2210,7 @@  discard block
 block discarded – undo
2210 2210
         }
2211 2211
 
2212 2212
         if ($likeExpr->escapeChar) {
2213
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2213
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2214 2214
         }
2215 2215
 
2216 2216
         return $sql;
@@ -2237,7 +2237,7 @@  discard block
 block discarded – undo
2237 2237
             ? $leftExpr->dispatch($this)
2238 2238
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2239 2239
 
2240
-        $sql .= ' ' . $compExpr->operator . ' ';
2240
+        $sql .= ' '.$compExpr->operator.' ';
2241 2241
 
2242 2242
         $sql .= $rightExpr instanceof AST\Node
2243 2243
             ? $rightExpr->dispatch($this)
@@ -2273,7 +2273,7 @@  discard block
 block discarded – undo
2273 2273
     {
2274 2274
         return $arithmeticExpr->isSimpleArithmeticExpression()
2275 2275
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2276
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2276
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2277 2277
     }
2278 2278
 
2279 2279
     /**
@@ -2281,7 +2281,7 @@  discard block
 block discarded – undo
2281 2281
      */
2282 2282
     public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
2283 2283
     {
2284
-        if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2284
+        if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2285 2285
             return $this->walkArithmeticTerm($simpleArithmeticExpr);
2286 2286
         }
2287 2287
 
@@ -2301,7 +2301,7 @@  discard block
 block discarded – undo
2301 2301
 
2302 2302
         // Phase 2 AST optimization: Skip processing of ArithmeticTerm
2303 2303
         // if only one ArithmeticFactor is defined
2304
-        if (! ($term instanceof AST\ArithmeticTerm)) {
2304
+        if ( ! ($term instanceof AST\ArithmeticTerm)) {
2305 2305
             return $this->walkArithmeticFactor($term);
2306 2306
         }
2307 2307
 
@@ -2321,13 +2321,13 @@  discard block
 block discarded – undo
2321 2321
 
2322 2322
         // Phase 2 AST optimization: Skip processing of ArithmeticFactor
2323 2323
         // if only one ArithmeticPrimary is defined
2324
-        if (! ($factor instanceof AST\ArithmeticFactor)) {
2324
+        if ( ! ($factor instanceof AST\ArithmeticFactor)) {
2325 2325
             return $this->walkArithmeticPrimary($factor);
2326 2326
         }
2327 2327
 
2328 2328
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2329 2329
 
2330
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2330
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2331 2331
     }
2332 2332
 
2333 2333
     /**
@@ -2340,7 +2340,7 @@  discard block
 block discarded – undo
2340 2340
     public function walkArithmeticPrimary($primary)
2341 2341
     {
2342 2342
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2343
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2343
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2344 2344
         }
2345 2345
 
2346 2346
         if ($primary instanceof AST\Node) {
@@ -2398,7 +2398,7 @@  discard block
 block discarded – undo
2398 2398
             $entityClassName = $entityClass->getClassName();
2399 2399
 
2400 2400
             if ($entityClassName !== $rootClass->getClassName()) {
2401
-                if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2401
+                if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2402 2402
                     throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName());
2403 2403
                 }
2404 2404
             }
@@ -2410,6 +2410,6 @@  discard block
 block discarded – undo
2410 2410
             $sqlParameterList[] = $this->conn->quote($discriminator);
2411 2411
         }
2412 2412
 
2413
-        return '(' . implode(', ', $sqlParameterList) . ')';
2413
+        return '('.implode(', ', $sqlParameterList).')';
2414 2414
     }
2415 2415
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/SchemaTool.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
                     $pkColumns = [];
181 181
 
182 182
                     foreach ($class->getPropertiesIterator() as $fieldName => $property) {
183
-                        if (! ($property instanceof FieldMetadata)) {
183
+                        if ( ! ($property instanceof FieldMetadata)) {
184 184
                             continue;
185 185
                         }
186 186
 
187
-                        if (! $class->isInheritedColumn($fieldName)) {
187
+                        if ( ! $class->isInheritedColumn($fieldName)) {
188 188
                             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
189 189
 
190 190
                             $this->gatherColumn($class, $property, $table);
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                             }
220 220
                         }
221 221
 
222
-                        if (! empty($inheritedKeyColumns)) {
222
+                        if ( ! empty($inheritedKeyColumns)) {
223 223
                             // Add a FK constraint on the ID column
224 224
                             $rootClass = $this->em->getClassMetadata($class->getRootClassName());
225 225
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
                 }
265 265
             }
266 266
 
267
-            if (! $table->hasIndex('primary')) {
267
+            if ( ! $table->hasIndex('primary')) {
268 268
                 $table->setPrimaryKey($pkColumns);
269 269
             }
270 270
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
             $processedClasses[$class->getClassName()] = true;
325 325
 
326 326
             foreach ($class->getPropertiesIterator() as $property) {
327
-                if (! $property instanceof FieldMetadata
327
+                if ( ! $property instanceof FieldMetadata
328 328
                     || ! $property->hasValueGenerator()
329 329
                     || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE
330 330
                     || $class->getClassName() !== $class->getRootClassName()) {
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
                 $generator  = $property->getValueGenerator()->getGenerator();
335 335
                 $quotedName = $generator->getSequenceName();
336 336
 
337
-                if (! $schema->hasSequence($quotedName)) {
337
+                if ( ! $schema->hasSequence($quotedName)) {
338 338
                     $schema->createSequence($quotedName, $generator->getAllocationSize());
339 339
                 }
340 340
             }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
             }
348 348
         }
349 349
 
350
-        if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) {
350
+        if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) {
351 351
             $schema->visit(new RemoveNamespacedAssets());
352 352
         }
353 353
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
                 break;
387 387
         }
388 388
 
389
-        if (! empty($discrColumn->getColumnDefinition())) {
389
+        if ( ! empty($discrColumn->getColumnDefinition())) {
390 390
             $options['columnDefinition'] = $discrColumn->getColumnDefinition();
391 391
         }
392 392
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
         $pkColumns = [];
405 405
 
406 406
         foreach ($class->getPropertiesIterator() as $fieldName => $property) {
407
-            if (! ($property instanceof FieldMetadata)) {
407
+            if ( ! ($property instanceof FieldMetadata)) {
408 408
                 continue;
409 409
             }
410 410
 
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
     private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks)
509 509
     {
510 510
         foreach ($class->getPropertiesIterator() as $fieldName => $property) {
511
-            if (! ($property instanceof AssociationMetadata)) {
511
+            if ( ! ($property instanceof AssociationMetadata)) {
512 512
                 continue;
513 513
             }
514 514
 
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
                 continue;
517 517
             }
518 518
 
519
-            if (! $property->isOwningSide()) {
519
+            if ( ! $property->isOwningSide()) {
520 520
                 continue;
521 521
             }
522 522
 
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
         $idColumns        = $class->getIdentifierColumns($this->em);
607 607
         $idColumnNameList = array_keys($idColumns);
608 608
 
609
-        if (! in_array($referencedColumnName, $idColumnNameList, true)) {
609
+        if ( ! in_array($referencedColumnName, $idColumnNameList, true)) {
610 610
             return null;
611 611
         }
612 612
 
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
         foreach ($class->getIdentifierFieldNames() as $fieldName) {
615 615
             $property = $class->getProperty($fieldName);
616 616
 
617
-            if (! ($property instanceof AssociationMetadata)) {
617
+            if ( ! ($property instanceof AssociationMetadata)) {
618 618
                 continue;
619 619
             }
620 620
 
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
                 $joinColumn->getReferencedColumnName()
671 671
             );
672 672
 
673
-            if (! $definingClass) {
673
+            if ( ! $definingClass) {
674 674
                 throw MissingColumnException::fromColumnSourceAndTarget(
675 675
                     $joinColumn->getReferencedColumnName(),
676 676
                     $mapping->getSourceEntity(),
@@ -685,14 +685,14 @@  discard block
 block discarded – undo
685 685
             $localColumns[]      = $quotedColumnName;
686 686
             $foreignColumns[]    = $quotedReferencedColumnName;
687 687
 
688
-            if (! $theJoinTable->hasColumn($quotedColumnName)) {
688
+            if ( ! $theJoinTable->hasColumn($quotedColumnName)) {
689 689
                 // Only add the column to the table if it does not exist already.
690 690
                 // It might exist already if the foreign key is mapped into a regular
691 691
                 // property as well.
692 692
                 $property  = $definingClass->getProperty($referencedFieldName);
693 693
                 $columnDef = null;
694 694
 
695
-                if (! empty($joinColumn->getColumnDefinition())) {
695
+                if ( ! empty($joinColumn->getColumnDefinition())) {
696 696
                     $columnDef = $joinColumn->getColumnDefinition();
697 697
                 } elseif ($property->getColumnDefinition()) {
698 698
                     $columnDef = $property->getColumnDefinition();
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
                 $uniqueConstraints[] = ['columns' => [$quotedColumnName]];
725 725
             }
726 726
 
727
-            if (! empty($joinColumn->getOnDelete())) {
727
+            if ( ! empty($joinColumn->getOnDelete())) {
728 728
                 $fkOptions['onDelete'] = $joinColumn->getOnDelete();
729 729
             }
730 730
         }
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
             $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName);
736 736
         }
737 737
 
738
-        $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns);
738
+        $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns);
739 739
 
740 740
         if (isset($addedFks[$compositeName])
741 741
             && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName']
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
             }
753 753
 
754 754
             $blacklistedFks[$compositeName] = true;
755
-        } elseif (! isset($blacklistedFks[$compositeName])) {
755
+        } elseif ( ! isset($blacklistedFks[$compositeName])) {
756 756
             $addedFks[$compositeName] = [
757 757
                 'foreignTableName' => $foreignTableName,
758 758
                 'foreignColumns'   => $foreignColumns,
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
         $fullSchema = $sm->createSchema();
852 852
 
853 853
         foreach ($fullSchema->getTables() as $table) {
854
-            if (! $schema->hasTable($table->getName())) {
854
+            if ( ! $schema->hasTable($table->getName())) {
855 855
                 foreach ($table->getForeignKeys() as $foreignKey) {
856 856
                     /** @var $foreignKey ForeignKeyConstraint */
857 857
                     if ($schema->hasTable($foreignKey->getForeignTableName())) {
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
                 if ($table->hasPrimaryKey()) {
877 877
                     $columns = $table->getPrimaryKey()->getColumns();
878 878
                     if (count($columns) === 1) {
879
-                        $checkSequence = $table->getName() . '_' . $columns[0] . '_seq';
879
+                        $checkSequence = $table->getName().'_'.$columns[0].'_seq';
880 880
                         if ($fullSchema->hasSequence($checkSequence)) {
881 881
                             $visitor->acceptSequence($fullSchema->getSequence($checkSequence));
882 882
                         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $parentClass = $this->class;
56 56
 
57 57
         while (($parentClass = $parentClass->getParent()) !== null) {
58
-            if (! $parentClass->isMappedSuperclass) {
58
+            if ( ! $parentClass->isMappedSuperclass) {
59 59
                 $parentTableName = $parentClass->getTableName();
60 60
 
61 61
                 if ($parentClass !== $rootClass) {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             }
112 112
 
113 113
             foreach ($data as $columnName => $value) {
114
-                if (! is_array($id) || ! isset($id[$columnName])) {
114
+                if ( ! is_array($id) || ! isset($id[$columnName])) {
115 115
                     $type = $this->columns[$columnName]->getType();
116 116
 
117 117
                     $stmt->bindValue($paramIndex++, $value, $type);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $updateData = $this->prepareUpdateData($entity);
137 137
 
138
-        if (! $updateData) {
138
+        if ( ! $updateData) {
139 139
             return;
140 140
         }
141 141
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             $versionedClass = $this->class->getPropertyTableClass($this->class->versionProperty->getName());
154 154
             $versionedTable = $versionedClass->getTableName();
155 155
 
156
-            if (! isset($updateData[$versionedTable])) {
156
+            if ( ! isset($updateData[$versionedTable])) {
157 157
                 $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform);
158 158
 
159 159
                 $this->updateTable($entity, $tableName, [], true);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $parentClass  = $this->class;
191 191
 
192 192
         while (($parentClass = $parentClass->getParent()) !== null) {
193
-            if (! $parentClass->isMappedSuperclass) {
193
+            if ( ! $parentClass->isMappedSuperclass) {
194 194
                 $parentTable = $parentClass->table->getQuotedQualifiedName($this->platform);
195 195
 
196 196
                 $this->conn->delete($parentTable, $id);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
         if ($filterSql) {
238 238
             $conditionSql .= $conditionSql
239
-                ? ' AND ' . $filterSql
239
+                ? ' AND '.$filterSql
240 240
                 : $filterSql;
241 241
         }
242 242
 
@@ -244,26 +244,26 @@  discard block
 block discarded – undo
244 244
 
245 245
         switch ($lockMode) {
246 246
             case LockMode::PESSIMISTIC_READ:
247
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
247
+                $lockSql = ' '.$this->platform->getReadLockSQL();
248 248
                 break;
249 249
 
250 250
             case LockMode::PESSIMISTIC_WRITE:
251
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
251
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
252 252
                 break;
253 253
         }
254 254
 
255 255
         $tableName  = $this->class->table->getQuotedQualifiedName($this->platform);
256
-        $from       = ' FROM ' . $tableName . ' ' . $baseTableAlias;
257
-        $where      = $conditionSql !== '' ? ' WHERE ' . $conditionSql : '';
256
+        $from       = ' FROM '.$tableName.' '.$baseTableAlias;
257
+        $where      = $conditionSql !== '' ? ' WHERE '.$conditionSql : '';
258 258
         $lock       = $this->platform->appendLockHint($from, $lockMode);
259 259
         $columnList = $this->getSelectColumnsSQL();
260
-        $query      = 'SELECT ' . $columnList
260
+        $query      = 'SELECT '.$columnList
261 261
                     . $lock
262 262
                     . $joinSql
263 263
                     . $where
264 264
                     . $orderBySql;
265 265
 
266
-        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql;
266
+        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql;
267 267
     }
268 268
 
269 269
     /**
@@ -285,14 +285,14 @@  discard block
 block discarded – undo
285 285
 
286 286
         if ($filterSql !== '') {
287 287
             $conditionSql = $conditionSql
288
-                ? $conditionSql . ' AND ' . $filterSql
288
+                ? $conditionSql.' AND '.$filterSql
289 289
                 : $filterSql;
290 290
         }
291 291
 
292 292
         return 'SELECT COUNT(*) '
293
-            . 'FROM ' . $tableName . ' ' . $baseTableAlias
293
+            . 'FROM '.$tableName.' '.$baseTableAlias
294 294
             . $joinSql
295
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
295
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
296 296
     }
297 297
 
298 298
     /**
@@ -308,23 +308,23 @@  discard block
 block discarded – undo
308 308
         $parentClass = $this->class;
309 309
 
310 310
         while (($parentClass = $parentClass->getParent()) !== null) {
311
-            if (! $parentClass->isMappedSuperclass) {
311
+            if ( ! $parentClass->isMappedSuperclass) {
312 312
                 $conditions = [];
313 313
                 $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
314 314
                 $tableAlias = $this->getSQLTableAlias($parentClass->getTableName());
315
-                $joinSql   .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
315
+                $joinSql   .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
316 316
 
317 317
                 foreach ($identifierColumns as $idColumn) {
318 318
                     $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
319 319
 
320
-                    $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
320
+                    $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
321 321
                 }
322 322
 
323 323
                 $joinSql .= implode(' AND ', $conditions);
324 324
             }
325 325
         }
326 326
 
327
-        return parent::getLockTablesSql($lockMode) . $joinSql;
327
+        return parent::getLockTablesSql($lockMode).$joinSql;
328 328
     }
329 329
 
330 330
     /**
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
                 continue;
353 353
             }
354 354
 
355
-            if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
355
+            if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
356 356
                 continue;
357 357
             }
358 358
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
                 /** @var JoinColumnMetadata $joinColumn */
363 363
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
364 364
 
365
-                if (! $joinColumn->getType()) {
365
+                if ( ! $joinColumn->getType()) {
366 366
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
367 367
                 }
368 368
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
382 382
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
383 383
 
384
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
384
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
385 385
 
386 386
         // sub tables
387 387
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
                             /** @var JoinColumnMetadata $joinColumn */
406 406
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
407 407
 
408
-                            if (! $joinColumn->getType()) {
408
+                            if ( ! $joinColumn->getType()) {
409 409
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
410 410
                             }
411 411
 
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                         $columnName           = $joinColumn->getColumnName();
457 457
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
458 458
 
459
-                        if (! $joinColumn->getType()) {
459
+                        if ( ! $joinColumn->getType()) {
460 460
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
461 461
                         }
462 462
 
@@ -509,16 +509,16 @@  discard block
 block discarded – undo
509 509
         $parentClass = $this->class;
510 510
 
511 511
         while (($parentClass = $parentClass->getParent()) !== null) {
512
-            if (! $parentClass->isMappedSuperclass) {
512
+            if ( ! $parentClass->isMappedSuperclass) {
513 513
                 $conditions = [];
514 514
                 $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
515 515
                 $tableAlias = $this->getSQLTableAlias($parentClass->getTableName());
516
-                $joinSql   .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
516
+                $joinSql   .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
517 517
 
518 518
                 foreach ($identifierColumns as $idColumn) {
519 519
                     $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
520 520
 
521
-                    $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
521
+                    $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
522 522
                 }
523 523
 
524 524
                 $joinSql .= implode(' AND ', $conditions);
@@ -531,12 +531,12 @@  discard block
 block discarded – undo
531 531
             $subClass   = $this->em->getClassMetadata($subClassName);
532 532
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
533 533
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName());
534
-            $joinSql   .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
534
+            $joinSql   .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
535 535
 
536 536
             foreach ($identifierColumns as $idColumn) {
537 537
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
538 538
 
539
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
539
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
540 540
             }
541 541
 
542 542
             $joinSql .= implode(' AND ', $conditions);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadata.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -220,11 +220,11 @@  discard block
 block discarded – undo
220 220
             $this->setCache(clone $parent->cache);
221 221
         }
222 222
 
223
-        if (! empty($parent->lifecycleCallbacks)) {
223
+        if ( ! empty($parent->lifecycleCallbacks)) {
224 224
             $this->lifecycleCallbacks = $parent->lifecycleCallbacks;
225 225
         }
226 226
 
227
-        if (! empty($parent->entityListeners)) {
227
+        if ( ! empty($parent->entityListeners)) {
228 228
             $this->entityListeners = $parent->entityListeners;
229 229
         }
230 230
     }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     {
266 266
         $rootClass = $parentClass = $this;
267 267
         while (($parentClass = $parentClass->getParent()) !== null) {
268
-            if (! $parentClass->isMappedSuperclass) {
268
+            if ( ! $parentClass->isMappedSuperclass) {
269 269
                 $rootClass = $parentClass;
270 270
             }
271 271
         }
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      */
297 297
     public function __toString()
298 298
     {
299
-        return self::class . '@' . spl_object_id($this);
299
+        return self::class.'@'.spl_object_id($this);
300 300
     }
301 301
 
302 302
     /**
@@ -392,11 +392,11 @@  discard block
 block discarded – undo
392 392
      */
393 393
     public function isIdentifier(string $fieldName) : bool
394 394
     {
395
-        if (! $this->identifier) {
395
+        if ( ! $this->identifier) {
396 396
             return false;
397 397
         }
398 398
 
399
-        if (! $this->isIdentifierComposite()) {
399
+        if ( ! $this->isIdentifierComposite()) {
400 400
             return $fieldName === $this->identifier[0];
401 401
         }
402 402
 
@@ -420,11 +420,11 @@  discard block
 block discarded – undo
420 420
         }
421 421
 
422 422
         // Verify & complete identifier mapping
423
-        if (! $this->identifier) {
423
+        if ( ! $this->identifier) {
424 424
             throw MappingException::identifierRequired($this->className);
425 425
         }
426 426
 
427
-        $explicitlyGeneratedProperties = array_filter($this->properties, static function (Property $property) : bool {
427
+        $explicitlyGeneratedProperties = array_filter($this->properties, static function(Property $property) : bool {
428 428
             return $property instanceof FieldMetadata
429 429
                 && $property->isPrimaryKey()
430 430
                 && $property->hasValueGenerator();
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         foreach ($this->lifecycleCallbacks as $callbacks) {
446 446
             /** @var array $callbacks */
447 447
             foreach ($callbacks as $callbackFuncName) {
448
-                if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
448
+                if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) {
449 449
                     throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName);
450 450
                 }
451 451
             }
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
             throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className);
475 475
         }
476 476
 
477
-        if (! isset($this->identifier[0])) {
477
+        if ( ! isset($this->identifier[0])) {
478 478
             throw MappingException::noIdDefined($this->className);
479 479
         }
480 480
 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
             // Association defined as Id field
534 534
             $targetClass = $em->getClassMetadata($property->getTargetEntity());
535 535
 
536
-            if (! $property->isOwningSide()) {
536
+            if ( ! $property->isOwningSide()) {
537 537
                 $property    = $targetClass->getProperty($property->getMappedBy());
538 538
                 $targetClass = $em->getClassMetadata($property->getTargetEntity());
539 539
             }
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
                 $columnName           = $joinColumn->getColumnName();
548 548
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
549 549
 
550
-                if (! $joinColumn->getType()) {
550
+                if ( ! $joinColumn->getType()) {
551 551
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em));
552 552
                 }
553 553
 
@@ -581,10 +581,10 @@  discard block
 block discarded – undo
581 581
     {
582 582
         $schema = $this->getSchemaName() === null
583 583
             ? ''
584
-            : $this->getSchemaName() . '_';
584
+            : $this->getSchemaName().'_';
585 585
 
586 586
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
587
-        return $schema . $this->getTableName() . '_id_tmp';
587
+        return $schema.$this->getTableName().'_id_tmp';
588 588
     }
589 589
 
590 590
     /**
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
      */
619 619
     public function setInheritanceType($type) : void
620 620
     {
621
-        if (! $this->isInheritanceType($type)) {
621
+        if ( ! $this->isInheritanceType($type)) {
622 622
             throw MappingException::invalidInheritanceType($this->className, $type);
623 623
         }
624 624
 
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
     {
637 637
         $fieldName = $property->getName();
638 638
 
639
-        if (! isset($this->properties[$fieldName])) {
639
+        if ( ! isset($this->properties[$fieldName])) {
640 640
             throw MappingException::invalidOverrideFieldName($this->className, $fieldName);
641 641
         }
642 642
 
@@ -748,13 +748,13 @@  discard block
 block discarded – undo
748 748
     public function getPropertyTableClass($fieldName) : ClassMetadata
749 749
     {
750 750
         $declaringClass = $this->properties[$fieldName]->getDeclaringClass();
751
-        if (! $declaringClass->isMappedSuperclass) {
751
+        if ( ! $declaringClass->isMappedSuperclass) {
752 752
             return $declaringClass;
753 753
         }
754 754
 
755 755
         $tableClass = $parentClass = $this;
756 756
         while (($parentClass = $parentClass->getParent()) && $parentClass !== $declaringClass) {
757
-            if (! $parentClass->isMappedSuperclass) {
757
+            if ( ! $parentClass->isMappedSuperclass) {
758 758
                 $tableClass = $parentClass;
759 759
             }
760 760
         }
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
         $inheritedProperty = $declaringClass->isMappedSuperclass ? clone $property : $property;
877 877
 
878 878
         if ($inheritedProperty instanceof FieldMetadata) {
879
-            if (! $declaringClass->isMappedSuperclass) {
879
+            if ( ! $declaringClass->isMappedSuperclass) {
880 880
                 $inheritedProperty->setTableName($property->getTableName());
881 881
             }
882 882
 
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
             if ($declaringClass->isMappedSuperclass) {
890 890
                 $tableClass = $parentClass = $this;
891 891
                 while (($parentClass = $parentClass->getParent()) && $parentClass !== $declaringClass) {
892
-                    if (! $parentClass->isMappedSuperclass) {
892
+                    if ( ! $parentClass->isMappedSuperclass) {
893 893
                         $tableClass = $parentClass;
894 894
                     }
895 895
                 }
@@ -975,11 +975,11 @@  discard block
 block discarded – undo
975 975
             'method' => $methodName,
976 976
         ];
977 977
 
978
-        if (! class_exists($class)) {
978
+        if ( ! class_exists($class)) {
979 979
             throw MappingException::entityListenerClassNotFound($class, $this->className);
980 980
         }
981 981
 
982
-        if (! method_exists($class, $methodName)) {
982
+        if ( ! method_exists($class, $methodName)) {
983 983
             throw MappingException::entityListenerMethodNotFound($class, $methodName, $this->className);
984 984
         }
985 985
 
@@ -1047,7 +1047,7 @@  discard block
 block discarded – undo
1047 1047
             return;
1048 1048
         }
1049 1049
 
1050
-        if (! (class_exists($className) || interface_exists($className))) {
1050
+        if ( ! (class_exists($className) || interface_exists($className))) {
1051 1051
             throw MappingException::invalidClassInDiscriminatorMap($className, $this->className);
1052 1052
         }
1053 1053
 
Please login to merge, or discard this patch.