Completed
Pull Request — master (#7921)
by Guilherme
14:09
created
lib/Doctrine/ORM/Query/Parser.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
         }
399 399
 
400 400
         foreach ($this->queryComponents as $dqlAlias => $qComp) {
401
-            if (! isset($this->identVariableExpressions[$dqlAlias])) {
401
+            if ( ! isset($this->identVariableExpressions[$dqlAlias])) {
402 402
                 continue;
403 403
             }
404 404
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
         $tokenStr = substr($dql, $tokenPos, $length);
464 464
 
465 465
         // Building informative message
466
-        $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;
466
+        $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message;
467 467
 
468 468
         throw QueryException::semanticalError(
469 469
             $message,
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
             $identVariable = $deferredItem['expression'];
567 567
 
568 568
             // Check if IdentificationVariable exists in queryComponents
569
-            if (! isset($this->queryComponents[$identVariable])) {
569
+            if ( ! isset($this->queryComponents[$identVariable])) {
570 570
                 $this->semanticalError(
571 571
                     sprintf("'%s' is not defined.", $identVariable),
572 572
                     $deferredItem['token']
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
             $qComp = $this->queryComponents[$identVariable];
577 577
 
578 578
             // Check if queryComponent points to an AbstractSchemaName or a ResultVariable
579
-            if (! isset($qComp['metadata'])) {
579
+            if ( ! isset($qComp['metadata'])) {
580 580
                 $this->semanticalError(
581 581
                     sprintf("'%s' does not point to a Class.", $identVariable),
582 582
                     $deferredItem['token']
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
             // If the namespace is not given then assumes the first FROM entity namespace
611 611
             if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) {
612 612
                 $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\'));
613
-                $fqcn      = $namespace . '\\' . $className;
613
+                $fqcn      = $namespace.'\\'.$className;
614 614
 
615 615
                 if (class_exists($fqcn)) {
616 616
                     $expression->className = $fqcn;
@@ -618,13 +618,13 @@  discard block
 block discarded – undo
618 618
                 }
619 619
             }
620 620
 
621
-            if (! class_exists($className)) {
621
+            if ( ! class_exists($className)) {
622 622
                 $this->semanticalError(sprintf('Class "%s" is not defined.', $className), $token);
623 623
             }
624 624
 
625 625
             $class = new ReflectionClass($className);
626 626
 
627
-            if (! $class->isInstantiable()) {
627
+            if ( ! $class->isInstantiable()) {
628 628
                 $this->semanticalError(sprintf('Class "%s" can not be instantiated.', $className), $token);
629 629
             }
630 630
 
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
             $resultVariable = $deferredItem['expression'];
682 682
 
683 683
             // Check if ResultVariable exists in queryComponents
684
-            if (! isset($this->queryComponents[$resultVariable])) {
684
+            if ( ! isset($this->queryComponents[$resultVariable])) {
685 685
                 $this->semanticalError(
686 686
                     sprintf("'%s' is not defined.", $resultVariable),
687 687
                     $deferredItem['token']
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
             $qComp = $this->queryComponents[$resultVariable];
692 692
 
693 693
             // Check if queryComponent points to an AbstractSchemaName or a ResultVariable
694
-            if (! isset($qComp['resultVariable'])) {
694
+            if ( ! isset($qComp['resultVariable'])) {
695 695
                 $this->semanticalError(
696 696
                     sprintf("'%s' does not point to a ResultVariable.", $resultVariable),
697 697
                     $deferredItem['token']
@@ -733,9 +733,9 @@  discard block
 block discarded – undo
733 733
             $property = $class->getProperty($field);
734 734
 
735 735
             // Check if field or association exists
736
-            if (! $property) {
736
+            if ( ! $property) {
737 737
                 $this->semanticalError(
738
-                    'Class ' . $class->getClassName() . ' has no field or association named ' . $field,
738
+                    'Class '.$class->getClassName().' has no field or association named '.$field,
739 739
                     $deferredItem['token']
740 740
                 );
741 741
             }
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
             // Validate if PathExpression is one of the expected types
752 752
             $expectedType = $pathExpression->expectedType;
753 753
 
754
-            if (! ($expectedType & $fieldType)) {
754
+            if ( ! ($expectedType & $fieldType)) {
755 755
                 // We need to recognize which was expected type(s)
756 756
                 $expectedStringTypes = [];
757 757
 
@@ -773,8 +773,8 @@  discard block
 block discarded – undo
773 773
                 // Build the error message
774 774
                 $semanticalError  = 'Invalid PathExpression. ';
775 775
                 $semanticalError .= count($expectedStringTypes) === 1
776
-                    ? 'Must be a ' . $expectedStringTypes[0] . '.'
777
-                    : implode(' or ', $expectedStringTypes) . ' expected.';
776
+                    ? 'Must be a '.$expectedStringTypes[0].'.'
777
+                    : implode(' or ', $expectedStringTypes).' expected.';
778 778
 
779 779
                 $this->semanticalError($semanticalError, $deferredItem['token']);
780 780
             }
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 
787 787
     private function processRootEntityAliasSelected()
788 788
     {
789
-        if (! $this->identVariableExpressions) {
789
+        if ( ! $this->identVariableExpressions) {
790 790
             return;
791 791
         }
792 792
 
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
 
944 944
         [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']);
945 945
 
946
-        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
946
+        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
947 947
     }
948 948
 
949 949
     /**
@@ -1022,9 +1022,9 @@  discard block
 block discarded – undo
1022 1022
     {
1023 1023
         $identVariable = $this->IdentificationVariable();
1024 1024
 
1025
-        if (! isset($this->queryComponents[$identVariable])) {
1025
+        if ( ! isset($this->queryComponents[$identVariable])) {
1026 1026
             $this->semanticalError(
1027
-                'Identification Variable ' . $identVariable . ' used in join path expression but was not defined before.'
1027
+                'Identification Variable '.$identVariable.' used in join path expression but was not defined before.'
1028 1028
             );
1029 1029
         }
1030 1030
 
@@ -1038,8 +1038,8 @@  discard block
 block discarded – undo
1038 1038
         $class    = $qComp['metadata'];
1039 1039
         $property = $class->getProperty($field);
1040 1040
 
1041
-        if (! ($property !== null && $property instanceof AssociationMetadata)) {
1042
-            $this->semanticalError('Class ' . $class->getClassName() . ' has no association named ' . $field);
1041
+        if ( ! ($property !== null && $property instanceof AssociationMetadata)) {
1042
+            $this->semanticalError('Class '.$class->getClassName().' has no association named '.$field);
1043 1043
         }
1044 1044
 
1045 1045
         return new AST\JoinAssociationPathExpression($identVariable, $field);
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
             while ($this->lexer->isNextToken(Lexer::T_DOT)) {
1070 1070
                 $this->match(Lexer::T_DOT);
1071 1071
                 $this->match(Lexer::T_IDENTIFIER);
1072
-                $field .= '.' . $this->lexer->token['value'];
1072
+                $field .= '.'.$this->lexer->token['value'];
1073 1073
             }
1074 1074
         }
1075 1075
 
@@ -1451,7 +1451,7 @@  discard block
 block discarded – undo
1451 1451
         // Still need to decide between IdentificationVariable or ResultVariable
1452 1452
         $lookaheadValue = $this->lexer->lookahead['value'];
1453 1453
 
1454
-        if (! isset($this->queryComponents[$lookaheadValue])) {
1454
+        if ( ! isset($this->queryComponents[$lookaheadValue])) {
1455 1455
             $this->semanticalError('Cannot group by undefined identification or result variable.');
1456 1456
         }
1457 1457
 
@@ -1799,7 +1799,7 @@  discard block
 block discarded – undo
1799 1799
         while ($this->lexer->isNextToken(Lexer::T_DOT)) {
1800 1800
             $this->match(Lexer::T_DOT);
1801 1801
             $this->match(Lexer::T_IDENTIFIER);
1802
-            $field .= '.' . $this->lexer->token['value'];
1802
+            $field .= '.'.$this->lexer->token['value'];
1803 1803
         }
1804 1804
 
1805 1805
         $partialFieldSet[] = $field;
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
             while ($this->lexer->isNextToken(Lexer::T_DOT)) {
1814 1814
                 $this->match(Lexer::T_DOT);
1815 1815
                 $this->match(Lexer::T_IDENTIFIER);
1816
-                $field .= '.' . $this->lexer->token['value'];
1816
+                $field .= '.'.$this->lexer->token['value'];
1817 1817
             }
1818 1818
 
1819 1819
             $partialFieldSet[] = $field;
@@ -2419,7 +2419,7 @@  discard block
 block discarded – undo
2419 2419
 
2420 2420
         // Phase 1 AST optimization: Prevent AST\ConditionalFactor
2421 2421
         // if only one AST\ConditionalPrimary is defined
2422
-        if (! $not) {
2422
+        if ( ! $not) {
2423 2423
             return $conditionalPrimary;
2424 2424
         }
2425 2425
 
@@ -2438,7 +2438,7 @@  discard block
 block discarded – undo
2438 2438
     {
2439 2439
         $condPrimary = new AST\ConditionalPrimary();
2440 2440
 
2441
-        if (! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) {
2441
+        if ( ! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) {
2442 2442
             $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
2443 2443
 
2444 2444
             return $condPrimary;
@@ -2607,7 +2607,7 @@  discard block
 block discarded – undo
2607 2607
             $this->match(Lexer::T_OF);
2608 2608
         }
2609 2609
 
2610
-        $collMemberExpr      = new AST\CollectionMemberExpression(
2610
+        $collMemberExpr = new AST\CollectionMemberExpression(
2611 2611
             $entityExpr,
2612 2612
             $this->CollectionValuedPathExpression()
2613 2613
         );
@@ -2941,7 +2941,7 @@  discard block
 block discarded – undo
2941 2941
         $lookaheadType = $this->lexer->lookahead['type'];
2942 2942
         $isDistinct    = false;
2943 2943
 
2944
-        if (! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) {
2944
+        if ( ! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) {
2945 2945
             $this->syntaxError('One of: MAX, MIN, AVG, SUM, COUNT');
2946 2946
         }
2947 2947
 
@@ -2971,7 +2971,7 @@  discard block
 block discarded – undo
2971 2971
         $lookaheadType = $this->lexer->lookahead['type'];
2972 2972
         $value         = $this->lexer->lookahead['value'];
2973 2973
 
2974
-        if (! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) {
2974
+        if ( ! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) {
2975 2975
             $this->syntaxError('ALL, ANY or SOME');
2976 2976
         }
2977 2977
 
@@ -3209,7 +3209,7 @@  discard block
 block discarded – undo
3209 3209
                 $lookaheadValue = $this->lexer->lookahead['value'];
3210 3210
 
3211 3211
                 // Validate existing component
3212
-                if (! isset($this->queryComponents[$lookaheadValue])) {
3212
+                if ( ! isset($this->queryComponents[$lookaheadValue])) {
3213 3213
                     $this->semanticalError('Cannot add having condition on undefined result variable.');
3214 3214
                 }
3215 3215
 
@@ -3220,7 +3220,7 @@  discard block
 block discarded – undo
3220 3220
                 }
3221 3221
 
3222 3222
                 // Validating ResultVariable
3223
-                if (! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) {
3223
+                if ( ! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) {
3224 3224
                     $this->semanticalError('Cannot add having condition on a non result variable.');
3225 3225
                 }
3226 3226
 
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
     /**
@@ -332,14 +332,14 @@  discard block
 block discarded – undo
332 332
 
333 333
             // If this is a joined association we must use left joins to preserve the correct result.
334 334
             $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER ';
335
-            $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
335
+            $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON ';
336 336
 
337 337
             $sqlParts = [];
338 338
 
339 339
             foreach ($class->getIdentifierColumns($this->em) as $column) {
340 340
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
341 341
 
342
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
342
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
343 343
             }
344 344
 
345 345
             $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias);
@@ -363,14 +363,14 @@  discard block
 block discarded – undo
363 363
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
364 364
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
365 365
 
366
-            $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
366
+            $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
367 367
 
368 368
             $sqlParts = [];
369 369
 
370 370
             foreach ($subClass->getIdentifierColumns($this->em) as $column) {
371 371
                 $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
372 372
 
373
-                $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
373
+                $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
374 374
             }
375 375
 
376 376
             $sql .= implode(' AND ', $sqlParts);
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
             $qComp       = $this->queryComponents[$dqlAlias];
392 392
             $association = $qComp['relation'];
393 393
 
394
-            if (! ($association instanceof ToManyAssociationMetadata)) {
394
+            if ( ! ($association instanceof ToManyAssociationMetadata)) {
395 395
                 continue;
396 396
             }
397 397
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
                 $property      = $qComp['metadata']->getProperty($fieldName);
400 400
                 $tableName     = $property->getTableName();
401 401
                 $columnName    = $this->platform->quoteIdentifier($property->getColumnName());
402
-                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName;
402
+                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName;
403 403
 
404 404
                 // OrderByClause should replace an ordered relation. see - DDC-2475
405 405
                 if (isset($this->orderedColumnsMap[$orderedColumn])) {
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                 }
408 408
 
409 409
                 $this->orderedColumnsMap[$orderedColumn] = $orientation;
410
-                $orderedColumns[]                        = $orderedColumn . ' ' . $orientation;
410
+                $orderedColumns[]                        = $orderedColumn.' '.$orientation;
411 411
             }
412 412
         }
413 413
 
@@ -447,19 +447,19 @@  discard block
 block discarded – undo
447 447
             $discrColumnType  = $discrColumn->getType();
448 448
             $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
449 449
             $sqlTableAlias    = $this->useSqlTableAliases
450
-                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
450
+                ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
451 451
                 : '';
452 452
 
453 453
             $sqlParts[] = sprintf(
454 454
                 '%s IN (%s)',
455
-                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
455
+                $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
456 456
                 implode(', ', $values)
457 457
             );
458 458
         }
459 459
 
460 460
         $sql = implode(' AND ', $sqlParts);
461 461
 
462
-        return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql;
462
+        return isset($sqlParts[1]) ? '('.$sql.')' : $sql;
463 463
     }
464 464
 
465 465
     /**
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
      */
473 473
     private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
474 474
     {
475
-        if (! $this->em->hasFilters()) {
475
+        if ( ! $this->em->hasFilters()) {
476 476
             return '';
477 477
         }
478 478
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
506 506
 
507 507
             if ($filterExpr !== '') {
508
-                $filterClauses[] = '(' . $filterExpr . ')';
508
+                $filterClauses[] = '('.$filterExpr.')';
509 509
             }
510 510
         }
511 511
 
@@ -536,11 +536,11 @@  discard block
 block discarded – undo
536 536
             $sql .= $this->walkOrderByClause($AST->orderByClause);
537 537
         }
538 538
 
539
-        if (! $AST->orderByClause) {
539
+        if ( ! $AST->orderByClause) {
540 540
             $orderBySql = $this->generateOrderedCollectionOrderByItems();
541 541
 
542 542
             if ($orderBySql) {
543
-                $sql .= ' ORDER BY ' . $orderBySql;
543
+                $sql .= ' ORDER BY '.$orderBySql;
544 544
             }
545 545
         }
546 546
 
@@ -553,11 +553,11 @@  discard block
 block discarded – undo
553 553
         }
554 554
 
555 555
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
556
-            return $sql . ' ' . $this->platform->getReadLockSQL();
556
+            return $sql.' '.$this->platform->getReadLockSQL();
557 557
         }
558 558
 
559 559
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
560
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
560
+            return $sql.' '.$this->platform->getWriteLockSQL();
561 561
         }
562 562
 
563 563
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
         }
566 566
 
567 567
         foreach ($this->selectedClasses as $selectedClass) {
568
-            if (! $selectedClass['class']->isVersioned()) {
568
+            if ( ! $selectedClass['class']->isVersioned()) {
569 569
                 throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName());
570 570
             }
571 571
         }
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
         foreach ($class->getIdentifierColumns($this->em) as $column) {
615 615
             $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());
616 616
 
617
-            $sqlParts[] = $tableAlias . '.' . $quotedColumnName;
617
+            $sqlParts[] = $tableAlias.'.'.$quotedColumnName;
618 618
         }
619 619
 
620 620
         return implode(', ', $sqlParts);
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
     {
633 633
         $class = $this->queryComponents[$identificationVariable]['metadata'];
634 634
 
635
-        if (! $fieldName) {
635
+        if ( ! $fieldName) {
636 636
             return $this->getSQLTableAlias($class->getTableName(), $identificationVariable);
637 637
         }
638 638
 
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
                 $property  = $class->getProperty($fieldName);
662 662
 
663 663
                 if ($this->useSqlTableAliases) {
664
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
664
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
665 665
                 }
666 666
 
667 667
                 $sql .= $this->platform->quoteIdentifier($property->getColumnName());
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
                 $class       = $this->queryComponents[$dqlAlias]['metadata'];
676 676
                 $association = $class->getProperty($fieldName);
677 677
 
678
-                if (! $association->isOwningSide()) {
678
+                if ( ! $association->isOwningSide()) {
679 679
                     throw QueryException::associationPathInverseSideNotSupported($pathExpr);
680 680
                 }
681 681
 
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
                 $joinColumn = reset($joinColumns);
690 690
 
691 691
                 if ($this->useSqlTableAliases) {
692
-                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.';
692
+                    $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.';
693 693
                 }
694 694
 
695 695
                 $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName());
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
      */
708 708
     public function walkSelectClause($selectClause)
709 709
     {
710
-        $sql                  = 'SELECT ' . ($selectClause->isDistinct ? 'DISTINCT ' : '');
710
+        $sql                  = 'SELECT '.($selectClause->isDistinct ? 'DISTINCT ' : '');
711 711
         $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions));
712 712
 
713 713
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) {
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
 
751 751
                 $sqlSelectExpressions[] = sprintf(
752 752
                     '%s AS %s',
753
-                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform),
753
+                    $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform),
754 754
                     $sqlColumnAlias
755 755
                 );
756 756
 
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 
761 761
             // Add foreign key columns of class and also parent classes
762 762
             foreach ($class->getPropertiesIterator() as $association) {
763
-                if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
763
+                if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())
764 764
                     || ( ! $addMetaColumns && ! $association->isPrimaryKey())) {
765 765
                     continue;
766 766
                 }
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
                     $columnAlias          = $this->getSQLColumnAlias();
776 776
                     $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
777 777
 
778
-                    if (! $joinColumn->getType()) {
778
+                    if ( ! $joinColumn->getType()) {
779 779
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
780 780
                     }
781 781
 
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
             }
792 792
 
793 793
             // Add foreign key columns to SQL, if necessary
794
-            if (! $addMetaColumns) {
794
+            if ( ! $addMetaColumns) {
795 795
                 continue;
796 796
             }
797 797
 
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
                         continue;
806 806
                     }
807 807
 
808
-                    if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
808
+                    if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) {
809 809
                         continue;
810 810
                     }
811 811
 
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
                         $columnAlias          = $this->getSQLColumnAlias();
820 820
                         $sqlTableAlias        = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias);
821 821
 
822
-                        if (! $joinColumn->getType()) {
822
+                        if ( ! $joinColumn->getType()) {
823 823
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
824 824
                         }
825 825
 
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
             }
837 837
         }
838 838
 
839
-        return $sql . implode(', ', $sqlSelectExpressions);
839
+        return $sql.implode(', ', $sqlSelectExpressions);
840 840
     }
841 841
 
842 842
     /**
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
852 852
         }
853 853
 
854
-        return ' FROM ' . implode(', ', $sqlParts);
854
+        return ' FROM '.implode(', ', $sqlParts);
855 855
     }
856 856
 
857 857
     /**
@@ -926,8 +926,8 @@  discard block
 block discarded – undo
926 926
         $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
927 927
         $lockMode   = $this->query->getHint(Query::HINT_LOCK_MODE);
928 928
         $sql        = $lockMode !== false
929
-            ? $this->platform->appendLockHint($tableName . ' ' . $tableAlias, $lockMode)
930
-            : $tableName . ' ' . $tableAlias;
929
+            ? $this->platform->appendLockHint($tableName.' '.$tableAlias, $lockMode)
930
+            : $tableName.' '.$tableAlias;
931 931
 
932 932
         if ($class->inheritanceType !== InheritanceType::JOINED) {
933 933
             return $sql;
@@ -935,11 +935,11 @@  discard block
 block discarded – undo
935 935
 
936 936
         $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias);
937 937
 
938
-        if (! $buildNestedJoins) {
939
-            return $sql . $classTableInheritanceJoins;
938
+        if ( ! $buildNestedJoins) {
939
+            return $sql.$classTableInheritanceJoins;
940 940
         }
941 941
 
942
-        return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')';
942
+        return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')';
943 943
     }
944 944
 
945 945
     /**
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
             : $association;
976 976
 
977 977
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true &&
978
-            (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
978
+            ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
979 979
             if ($association instanceof ToManyAssociationMetadata) {
980 980
                 throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation);
981 981
             }
@@ -1029,7 +1029,7 @@  discard block
 block discarded – undo
1029 1029
             }
1030 1030
 
1031 1031
             $targetTableJoin = [
1032
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1032
+                'table' => $targetTableName.' '.$targetTableAlias,
1033 1033
                 'condition' => implode(' AND ', $conditions),
1034 1034
             ];
1035 1035
         } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) {
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
                 );
1057 1057
             }
1058 1058
 
1059
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1059
+            $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1060 1060
 
1061 1061
             // Join target table
1062 1062
             $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
             }
1095 1095
 
1096 1096
             $targetTableJoin = [
1097
-                'table' => $targetTableName . ' ' . $targetTableAlias,
1097
+                'table' => $targetTableName.' '.$targetTableAlias,
1098 1098
                 'condition' => implode(' AND ', $conditions),
1099 1099
             ];
1100 1100
         } else {
@@ -1102,23 +1102,23 @@  discard block
 block discarded – undo
1102 1102
         }
1103 1103
 
1104 1104
         // Handle WITH clause
1105
-        $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1105
+        $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1106 1106
 
1107 1107
         if ($targetClass->inheritanceType === InheritanceType::JOINED) {
1108 1108
             $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1109 1109
 
1110 1110
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1111 1111
             if ($withCondition) {
1112
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1112
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1113 1113
             } else {
1114
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1114
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1115 1115
             }
1116 1116
         } else {
1117
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1117
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1118 1118
         }
1119 1119
 
1120 1120
         if ($withCondition) {
1121
-            $sql .= ' AND ' . $withCondition;
1121
+            $sql .= ' AND '.$withCondition;
1122 1122
         }
1123 1123
 
1124 1124
         // Apply the indexes
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1153 1153
         }
1154 1154
 
1155
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1155
+        return ' ORDER BY '.implode(', ', $orderByItems);
1156 1156
     }
1157 1157
 
1158 1158
     /**
@@ -1169,10 +1169,10 @@  discard block
 block discarded – undo
1169 1169
         $this->orderedColumnsMap[$sql] = $type;
1170 1170
 
1171 1171
         if ($expr instanceof AST\Subselect) {
1172
-            return '(' . $sql . ') ' . $type;
1172
+            return '('.$sql.') '.$type;
1173 1173
         }
1174 1174
 
1175
-        return $sql . ' ' . $type;
1175
+        return $sql.' '.$type;
1176 1176
     }
1177 1177
 
1178 1178
     /**
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
      */
1181 1181
     public function walkHavingClause($havingClause)
1182 1182
     {
1183
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1183
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1184 1184
     }
1185 1185
 
1186 1186
     /**
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
                 $conditions = [];
1204 1204
 
1205 1205
                 if ($join->conditionalExpression) {
1206
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1206
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1207 1207
                 }
1208 1208
 
1209 1209
                 $isUnconditionalJoin = empty($conditions);
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
                 }
1229 1229
 
1230 1230
                 if ($conditions) {
1231
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1231
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1232 1232
                 }
1233 1233
 
1234 1234
                 break;
@@ -1258,7 +1258,7 @@  discard block
 block discarded – undo
1258 1258
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1259 1259
         }
1260 1260
 
1261
-        return $sql . implode(', ', $scalarExpressions) . ')';
1261
+        return $sql.implode(', ', $scalarExpressions).')';
1262 1262
     }
1263 1263
 
1264 1264
     /**
@@ -1278,7 +1278,7 @@  discard block
 block discarded – undo
1278 1278
             ? $this->conn->quote($nullIfExpression->secondExpression)
1279 1279
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1280 1280
 
1281
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1281
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1282 1282
     }
1283 1283
 
1284 1284
     /**
@@ -1291,11 +1291,11 @@  discard block
 block discarded – undo
1291 1291
         $sql = 'CASE';
1292 1292
 
1293 1293
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1294
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1295
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1294
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1295
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1296 1296
         }
1297 1297
 
1298
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1298
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1299 1299
 
1300 1300
         return $sql;
1301 1301
     }
@@ -1309,14 +1309,14 @@  discard block
 block discarded – undo
1309 1309
      */
1310 1310
     public function walkSimpleCaseExpression($simpleCaseExpression)
1311 1311
     {
1312
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1312
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1313 1313
 
1314 1314
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1315
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1316
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1315
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1316
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1317 1317
         }
1318 1318
 
1319
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1319
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1320 1320
 
1321 1321
         return $sql;
1322 1322
     }
@@ -1357,7 +1357,7 @@  discard block
 block discarded – undo
1357 1357
 
1358 1358
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1359 1359
 
1360
-                if (! $hidden) {
1360
+                if ( ! $hidden) {
1361 1361
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType());
1362 1362
                     $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias;
1363 1363
                 }
@@ -1378,11 +1378,11 @@  discard block
 block discarded – undo
1378 1378
                 $columnAlias = $this->getSQLColumnAlias();
1379 1379
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1380 1380
 
1381
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1381
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1382 1382
 
1383 1383
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1384 1384
 
1385
-                if (! $hidden) {
1385
+                if ( ! $hidden) {
1386 1386
                     // Conceptually we could resolve field type here by traverse through AST to retrieve field type,
1387 1387
                     // but this is not a feasible solution; assume 'string'.
1388 1388
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
@@ -1393,11 +1393,11 @@  discard block
 block discarded – undo
1393 1393
                 $columnAlias = $this->getSQLColumnAlias();
1394 1394
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1395 1395
 
1396
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1396
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1397 1397
 
1398 1398
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1399 1399
 
1400
-                if (! $hidden) {
1400
+                if ( ! $hidden) {
1401 1401
                     // We cannot resolve field type here; assume 'string'.
1402 1402
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string'));
1403 1403
                 }
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
                 $class       = $queryComp['metadata'];
1422 1422
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: null;
1423 1423
 
1424
-                if (! isset($this->selectedClasses[$dqlAlias])) {
1424
+                if ( ! isset($this->selectedClasses[$dqlAlias])) {
1425 1425
                     $this->selectedClasses[$dqlAlias] = [
1426 1426
                         'class'       => $class,
1427 1427
                         'dqlAlias'    => $dqlAlias,
@@ -1433,7 +1433,7 @@  discard block
 block discarded – undo
1433 1433
 
1434 1434
                 // Select all fields from the queried class
1435 1435
                 foreach ($class->getPropertiesIterator() as $fieldName => $property) {
1436
-                    if (! ($property instanceof FieldMetadata)) {
1436
+                    if ( ! ($property instanceof FieldMetadata)) {
1437 1437
                         continue;
1438 1438
                     }
1439 1439
 
@@ -1468,7 +1468,7 @@  discard block
 block discarded – undo
1468 1468
                         $subClass = $this->em->getClassMetadata($subClassName);
1469 1469
 
1470 1470
                         foreach ($subClass->getPropertiesIterator() as $fieldName => $property) {
1471
-                            if (! ($property instanceof FieldMetadata)) {
1471
+                            if ( ! ($property instanceof FieldMetadata)) {
1472 1472
                                 continue;
1473 1473
                             }
1474 1474
 
@@ -1507,7 +1507,7 @@  discard block
 block discarded – undo
1507 1507
      */
1508 1508
     public function walkQuantifiedExpression($qExpr)
1509 1509
     {
1510
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1510
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1511 1511
     }
1512 1512
 
1513 1513
     /**
@@ -1547,7 +1547,7 @@  discard block
 block discarded – undo
1547 1547
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1548 1548
         }
1549 1549
 
1550
-        return ' FROM ' . implode(', ', $sqlParts);
1550
+        return ' FROM '.implode(', ', $sqlParts);
1551 1551
     }
1552 1552
 
1553 1553
     /**
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
      */
1556 1556
     public function walkSimpleSelectClause($simpleSelectClause)
1557 1557
     {
1558
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1558
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1559 1559
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1560 1560
     }
1561 1561
 
@@ -1589,7 +1589,7 @@  discard block
 block discarded – undo
1589 1589
                     break;
1590 1590
 
1591 1591
                 case $e instanceof AST\Subselect:
1592
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1592
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1593 1593
                     break;
1594 1594
 
1595 1595
                 case $e instanceof AST\PathExpression:
@@ -1598,7 +1598,7 @@  discard block
 block discarded – undo
1598 1598
                     $class     = $qComp['metadata'];
1599 1599
                     $fieldType = $class->getProperty($e->field)->getType();
1600 1600
 
1601
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1601
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1602 1602
                     break;
1603 1603
 
1604 1604
                 case $e instanceof AST\Literal:
@@ -1612,11 +1612,11 @@  discard block
 block discarded – undo
1612 1612
                             break;
1613 1613
                     }
1614 1614
 
1615
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1615
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1616 1616
                     break;
1617 1617
 
1618 1618
                 default:
1619
-                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias;
1619
+                    $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias;
1620 1620
                     break;
1621 1621
             }
1622 1622
 
@@ -1649,10 +1649,10 @@  discard block
 block discarded – undo
1649 1649
             case $expr instanceof AST\Subselect:
1650 1650
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1651 1651
 
1652
-                $columnAlias                        = 'sclr' . $this->aliasCounter++;
1652
+                $columnAlias                        = 'sclr'.$this->aliasCounter++;
1653 1653
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1654 1654
 
1655
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1655
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1656 1656
                 break;
1657 1657
 
1658 1658
             case $expr instanceof AST\Functions\FunctionNode:
@@ -1669,7 +1669,7 @@  discard block
 block discarded – undo
1669 1669
                 $columnAlias                        = $this->getSQLColumnAlias();
1670 1670
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1671 1671
 
1672
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1672
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1673 1673
                 break;
1674 1674
 
1675 1675
             case $expr instanceof AST\ParenthesisExpression:
@@ -1689,8 +1689,8 @@  discard block
 block discarded – undo
1689 1689
      */
1690 1690
     public function walkAggregateExpression($aggExpression)
1691 1691
     {
1692
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1693
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1692
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1693
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1694 1694
     }
1695 1695
 
1696 1696
     /**
@@ -1704,7 +1704,7 @@  discard block
 block discarded – undo
1704 1704
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1705 1705
         }
1706 1706
 
1707
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1707
+        return ' GROUP BY '.implode(', ', $sqlParts);
1708 1708
     }
1709 1709
 
1710 1710
     /**
@@ -1713,7 +1713,7 @@  discard block
 block discarded – undo
1713 1713
     public function walkGroupByItem($groupByItem)
1714 1714
     {
1715 1715
         // StateFieldPathExpression
1716
-        if (! is_string($groupByItem)) {
1716
+        if ( ! is_string($groupByItem)) {
1717 1717
             return $this->walkPathExpression($groupByItem);
1718 1718
         }
1719 1719
 
@@ -1767,7 +1767,7 @@  discard block
 block discarded – undo
1767 1767
     {
1768 1768
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1769 1769
         $tableName = $class->getTableName();
1770
-        $sql       = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform);
1770
+        $sql       = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform);
1771 1771
 
1772 1772
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1773 1773
 
@@ -1783,12 +1783,12 @@  discard block
 block discarded – undo
1783 1783
     {
1784 1784
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1785 1785
         $tableName = $class->getTableName();
1786
-        $sql       = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform);
1786
+        $sql       = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform);
1787 1787
 
1788 1788
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1789 1789
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1790 1790
 
1791
-        return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1791
+        return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1792 1792
     }
1793 1793
 
1794 1794
     /**
@@ -1799,7 +1799,7 @@  discard block
 block discarded – undo
1799 1799
         $useTableAliasesBefore    = $this->useSqlTableAliases;
1800 1800
         $this->useSqlTableAliases = false;
1801 1801
 
1802
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1802
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1803 1803
         $newValue = $updateItem->newValue;
1804 1804
 
1805 1805
         switch (true) {
@@ -1843,7 +1843,7 @@  discard block
 block discarded – undo
1843 1843
 
1844 1844
             if ($filterClauses) {
1845 1845
                 if ($condSql) {
1846
-                    $condSql = '(' . $condSql . ') AND ';
1846
+                    $condSql = '('.$condSql.') AND ';
1847 1847
                 }
1848 1848
 
1849 1849
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1851,11 +1851,11 @@  discard block
 block discarded – undo
1851 1851
         }
1852 1852
 
1853 1853
         if ($condSql) {
1854
-            return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1854
+            return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql);
1855 1855
         }
1856 1856
 
1857 1857
         if ($discrSql) {
1858
-            return ' WHERE ' . $discrSql;
1858
+            return ' WHERE '.$discrSql;
1859 1859
         }
1860 1860
 
1861 1861
         return '';
@@ -1868,7 +1868,7 @@  discard block
 block discarded – undo
1868 1868
     {
1869 1869
         // Phase 2 AST optimization: Skip processing of ConditionalExpression
1870 1870
         // if only one ConditionalTerm is defined
1871
-        if (! ($condExpr instanceof AST\ConditionalExpression)) {
1871
+        if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
1872 1872
             return $this->walkConditionalTerm($condExpr);
1873 1873
         }
1874 1874
 
@@ -1882,7 +1882,7 @@  discard block
 block discarded – undo
1882 1882
     {
1883 1883
         // Phase 2 AST optimization: Skip processing of ConditionalTerm
1884 1884
         // if only one ConditionalFactor is defined
1885
-        if (! ($condTerm instanceof AST\ConditionalTerm)) {
1885
+        if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
1886 1886
             return $this->walkConditionalFactor($condTerm);
1887 1887
         }
1888 1888
 
@@ -1898,7 +1898,7 @@  discard block
 block discarded – undo
1898 1898
         // if only one ConditionalPrimary is defined
1899 1899
         return ! ($factor instanceof AST\ConditionalFactor)
1900 1900
             ? $this->walkConditionalPrimary($factor)
1901
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1901
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1902 1902
     }
1903 1903
 
1904 1904
     /**
@@ -1913,7 +1913,7 @@  discard block
 block discarded – undo
1913 1913
         if ($primary->isConditionalExpression()) {
1914 1914
             $condExpr = $primary->conditionalExpression;
1915 1915
 
1916
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1916
+            return '('.$this->walkConditionalExpression($condExpr).')';
1917 1917
         }
1918 1918
 
1919 1919
         return '';
@@ -1926,7 +1926,7 @@  discard block
 block discarded – undo
1926 1926
     {
1927 1927
         $sql = $existsExpr->not ? 'NOT ' : '';
1928 1928
 
1929
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1929
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1930 1930
 
1931 1931
         return $sql;
1932 1932
     }
@@ -1974,7 +1974,7 @@  discard block
 block discarded – undo
1974 1974
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1975 1975
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1976 1976
 
1977
-            $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE ';
1977
+            $sql .= $targetTableName.' '.$targetTableAlias.' WHERE ';
1978 1978
 
1979 1979
             $sqlParts = [];
1980 1980
 
@@ -1995,7 +1995,7 @@  discard block
 block discarded – undo
1995 1995
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1996 1996
                 }
1997 1997
 
1998
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
1998
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
1999 1999
             }
2000 2000
 
2001 2001
             $sql .= implode(' AND ', $sqlParts);
@@ -2009,7 +2009,7 @@  discard block
 block discarded – undo
2009 2009
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
2010 2010
 
2011 2011
             // join to target table
2012
-            $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON ';
2012
+            $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON ';
2013 2013
 
2014 2014
             // join conditions
2015 2015
             $joinSqlParts = [];
@@ -2058,13 +2058,13 @@  discard block
 block discarded – undo
2058 2058
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
2059 2059
                 }
2060 2060
 
2061
-                $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql;
2061
+                $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql;
2062 2062
             }
2063 2063
 
2064 2064
             $sql .= implode(' AND ', $sqlParts);
2065 2065
         }
2066 2066
 
2067
-        return $sql . ')';
2067
+        return $sql.')';
2068 2068
     }
2069 2069
 
2070 2070
     /**
@@ -2075,7 +2075,7 @@  discard block
 block discarded – undo
2075 2075
         $sizeFunc                           = new AST\Functions\SizeFunction('size');
2076 2076
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2077 2077
 
2078
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2078
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2079 2079
     }
2080 2080
 
2081 2081
     /**
@@ -2084,19 +2084,19 @@  discard block
 block discarded – undo
2084 2084
     public function walkNullComparisonExpression($nullCompExpr)
2085 2085
     {
2086 2086
         $expression = $nullCompExpr->expression;
2087
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2087
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2088 2088
 
2089 2089
         // Handle ResultVariable
2090 2090
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2091
-            return $this->walkResultVariable($expression) . $comparison;
2091
+            return $this->walkResultVariable($expression).$comparison;
2092 2092
         }
2093 2093
 
2094 2094
         // Handle InputParameter mapping inclusion to ParserResult
2095 2095
         if ($expression instanceof AST\InputParameter) {
2096
-            return $this->walkInputParameter($expression) . $comparison;
2096
+            return $this->walkInputParameter($expression).$comparison;
2097 2097
         }
2098 2098
 
2099
-        return $expression->dispatch($this) . $comparison;
2099
+        return $expression->dispatch($this).$comparison;
2100 2100
     }
2101 2101
 
2102 2102
     /**
@@ -2104,7 +2104,7 @@  discard block
 block discarded – undo
2104 2104
      */
2105 2105
     public function walkInExpression($inExpr)
2106 2106
     {
2107
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2107
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2108 2108
 
2109 2109
         $sql .= $inExpr->subselect
2110 2110
             ? $this->walkSubselect($inExpr->subselect)
@@ -2129,12 +2129,12 @@  discard block
 block discarded – undo
2129 2129
         $discrColumnType  = $discrColumn->getType();
2130 2130
         $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName());
2131 2131
         $sqlTableAlias    = $this->useSqlTableAliases
2132
-            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.'
2132
+            ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.'
2133 2133
             : '';
2134 2134
 
2135 2135
         return sprintf(
2136 2136
             '%s %sIN %s',
2137
-            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform),
2137
+            $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform),
2138 2138
             ($instanceOfExpr->not ? 'NOT ' : ''),
2139 2139
             $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr)
2140 2140
         );
@@ -2178,8 +2178,8 @@  discard block
 block discarded – undo
2178 2178
             $sql .= ' NOT';
2179 2179
         }
2180 2180
 
2181
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2182
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2181
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2182
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2183 2183
 
2184 2184
         return $sql;
2185 2185
     }
@@ -2194,7 +2194,7 @@  discard block
 block discarded – undo
2194 2194
             ? $this->walkResultVariable($stringExpr)
2195 2195
             : $stringExpr->dispatch($this);
2196 2196
 
2197
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2197
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2198 2198
 
2199 2199
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2200 2200
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2207,7 +2207,7 @@  discard block
 block discarded – undo
2207 2207
         }
2208 2208
 
2209 2209
         if ($likeExpr->escapeChar) {
2210
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2210
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2211 2211
         }
2212 2212
 
2213 2213
         return $sql;
@@ -2234,7 +2234,7 @@  discard block
 block discarded – undo
2234 2234
             ? $leftExpr->dispatch($this)
2235 2235
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2236 2236
 
2237
-        $sql .= ' ' . $compExpr->operator . ' ';
2237
+        $sql .= ' '.$compExpr->operator.' ';
2238 2238
 
2239 2239
         $sql .= $rightExpr instanceof AST\Node
2240 2240
             ? $rightExpr->dispatch($this)
@@ -2270,7 +2270,7 @@  discard block
 block discarded – undo
2270 2270
     {
2271 2271
         return $arithmeticExpr->isSimpleArithmeticExpression()
2272 2272
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2273
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2273
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2274 2274
     }
2275 2275
 
2276 2276
     /**
@@ -2278,7 +2278,7 @@  discard block
 block discarded – undo
2278 2278
      */
2279 2279
     public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
2280 2280
     {
2281
-        if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2281
+        if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
2282 2282
             return $this->walkArithmeticTerm($simpleArithmeticExpr);
2283 2283
         }
2284 2284
 
@@ -2298,7 +2298,7 @@  discard block
 block discarded – undo
2298 2298
 
2299 2299
         // Phase 2 AST optimization: Skip processing of ArithmeticTerm
2300 2300
         // if only one ArithmeticFactor is defined
2301
-        if (! ($term instanceof AST\ArithmeticTerm)) {
2301
+        if ( ! ($term instanceof AST\ArithmeticTerm)) {
2302 2302
             return $this->walkArithmeticFactor($term);
2303 2303
         }
2304 2304
 
@@ -2318,13 +2318,13 @@  discard block
 block discarded – undo
2318 2318
 
2319 2319
         // Phase 2 AST optimization: Skip processing of ArithmeticFactor
2320 2320
         // if only one ArithmeticPrimary is defined
2321
-        if (! ($factor instanceof AST\ArithmeticFactor)) {
2321
+        if ( ! ($factor instanceof AST\ArithmeticFactor)) {
2322 2322
             return $this->walkArithmeticPrimary($factor);
2323 2323
         }
2324 2324
 
2325 2325
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2326 2326
 
2327
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2327
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2328 2328
     }
2329 2329
 
2330 2330
     /**
@@ -2337,7 +2337,7 @@  discard block
 block discarded – undo
2337 2337
     public function walkArithmeticPrimary($primary)
2338 2338
     {
2339 2339
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2340
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2340
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2341 2341
         }
2342 2342
 
2343 2343
         if ($primary instanceof AST\Node) {
@@ -2395,7 +2395,7 @@  discard block
 block discarded – undo
2395 2395
             $entityClassName = $entityClass->getClassName();
2396 2396
 
2397 2397
             if ($entityClassName !== $rootClass->getClassName()) {
2398
-                if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2398
+                if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
2399 2399
                     throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName());
2400 2400
                 }
2401 2401
             }
@@ -2407,6 +2407,6 @@  discard block
 block discarded – undo
2407 2407
             $sqlParameterList[] = $this->conn->quote($discriminator);
2408 2408
         }
2409 2409
 
2410
-        return '(' . implode(', ', $sqlParameterList) . ')';
2410
+        return '('.implode(', ', $sqlParameterList).')';
2411 2411
     }
2412 2412
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Proxy/Factory/StaticProxyFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function generateProxyClasses(array $classes) : int
58 58
     {
59
-        $concreteClasses = array_filter($classes, static function (ClassMetadata $metadata) : bool {
59
+        $concreteClasses = array_filter($classes, static function(ClassMetadata $metadata) : bool {
60 60
             return ! ($metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract());
61 61
         });
62 62
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 ->proxyFactory
66 66
                 ->createProxy(
67 67
                     $metadata->getClassName(),
68
-                    static function () {
68
+                    static function() {
69 69
                         // empty closure, serves its purpose, for now
70 70
                     },
71 71
                     $this->skippedFieldsFqns($metadata)
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
     private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : Closure
104 104
     {
105
-        return static function (
105
+        return static function(
106 106
             GhostObjectInterface $ghostObject,
107 107
             string $method,
108 108
             // we don't care
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $identifier = $persister->getIdentifier($ghostObject);
122 122
 
123 123
             // @TODO how do we use `$properties` in the persister? That would be a massive optimisation
124
-            if (! $persister->loadById($identifier, $ghostObject)) {
124
+            if ( ! $persister->loadById($identifier, $ghostObject)) {
125 125
                 $initializer = $originalInitializer;
126 126
 
127 127
                 throw EntityNotFoundException::fromClassNameAndIdentifier(
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $transientFieldsFqns = [];
154 154
 
155 155
         foreach ($metadata->getPropertiesIterator() as $name => $property) {
156
-            if (! $property instanceof TransientMetadata) {
156
+            if ( ! $property instanceof TransientMetadata) {
157 157
                 continue;
158 158
             }
159 159
 
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
     private function propertyFqcn(ReflectionProperty $property) : string
192 192
     {
193 193
         if ($property->isPrivate()) {
194
-            return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName();
194
+            return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName();
195 195
         }
196 196
 
197 197
         if ($property->isProtected()) {
198
-            return "\0*\0" . $property->getName();
198
+            return "\0*\0".$property->getName();
199 199
         }
200 200
 
201 201
         return $property->getName();
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->isInheritedProperty($fieldName)) {
187
+                        if ( ! $class->isInheritedProperty($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,7 +685,7 @@  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.
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
                     'notnull' => ! $joinColumn->isNullable(),
695 695
                 ] + $this->gatherColumnOptions($property->getOptions());
696 696
 
697
-                if (! empty($joinColumn->getColumnDefinition())) {
697
+                if ( ! empty($joinColumn->getColumnDefinition())) {
698 698
                     $columnOptions['columnDefinition'] = $joinColumn->getColumnDefinition();
699 699
                 } elseif ($property->getColumnDefinition()) {
700 700
                     $columnOptions['columnDefinition'] = $property->getColumnDefinition();
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
                 $uniqueConstraints[] = ['columns' => [$quotedColumnName]];
721 721
             }
722 722
 
723
-            if (! empty($joinColumn->getOnDelete())) {
723
+            if ( ! empty($joinColumn->getOnDelete())) {
724 724
                 $fkOptions['onDelete'] = $joinColumn->getOnDelete();
725 725
             }
726 726
         }
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
             $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName);
732 732
         }
733 733
 
734
-        $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns);
734
+        $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns);
735 735
 
736 736
         if (isset($addedFks[$compositeName])
737 737
             && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName']
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
             }
749 749
 
750 750
             $blacklistedFks[$compositeName] = true;
751
-        } elseif (! isset($blacklistedFks[$compositeName])) {
751
+        } elseif ( ! isset($blacklistedFks[$compositeName])) {
752 752
             $addedFks[$compositeName] = [
753 753
                 'foreignTableName' => $foreignTableName,
754 754
                 'foreignColumns'   => $foreignColumns,
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
         $fullSchema = $sm->createSchema();
848 848
 
849 849
         foreach ($fullSchema->getTables() as $table) {
850
-            if (! $schema->hasTable($table->getName())) {
850
+            if ( ! $schema->hasTable($table->getName())) {
851 851
                 foreach ($table->getForeignKeys() as $foreignKey) {
852 852
                     /** @var $foreignKey ForeignKeyConstraint */
853 853
                     if ($schema->hasTable($foreignKey->getForeignTableName())) {
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
                 if ($table->hasPrimaryKey()) {
873 873
                     $columns = $table->getPrimaryKey()->getColumns();
874 874
                     if (count($columns) === 1) {
875
-                        $checkSequence = $table->getName() . '_' . $columns[0] . '_seq';
875
+                        $checkSequence = $table->getName().'_'.$columns[0].'_seq';
876 876
                         if ($fullSchema->hasSequence($checkSequence)) {
877 877
                             $visitor->acceptSequence($fullSchema->getSequence($checkSequence));
878 878
                         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -295,16 +295,16 @@  discard block
 block discarded – undo
295 295
         $tableName      = $versionedClass->table->getQuotedQualifiedName($this->platform);
296 296
         $columnName     = $this->platform->quoteIdentifier($versionProperty->getColumnName());
297 297
         $identifier     = array_map(
298
-            function ($columnName) {
298
+            function($columnName) {
299 299
                 return $this->platform->quoteIdentifier($columnName);
300 300
             },
301 301
             array_keys($versionedClass->getIdentifierColumns($this->em))
302 302
         );
303 303
 
304 304
         // FIXME: Order with composite keys might not be correct
305
-        $sql = 'SELECT ' . $columnName
306
-             . ' FROM ' . $tableName
307
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
305
+        $sql = 'SELECT '.$columnName
306
+             . ' FROM '.$tableName
307
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
308 308
 
309 309
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
310 310
         $versionType = $versionProperty->getType();
@@ -342,13 +342,13 @@  discard block
 block discarded – undo
342 342
         $tableName  = $this->class->getTableName();
343 343
         $updateData = $this->prepareUpdateData($entity);
344 344
 
345
-        if (! isset($updateData[$tableName])) {
345
+        if ( ! isset($updateData[$tableName])) {
346 346
             return;
347 347
         }
348 348
 
349 349
         $data = $updateData[$tableName];
350 350
 
351
-        if (! $data) {
351
+        if ( ! $data) {
352 352
             return;
353 353
         }
354 354
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 
401 401
             if ($value !== null) {
402 402
                 // @todo guilhermeblanco Make sure we do not have flat association values.
403
-                if (! is_array($value)) {
403
+                if ( ! is_array($value)) {
404 404
                     $value = [$targetClass->identifier[0] => $value];
405 405
                 }
406 406
 
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
414 414
                 $targetField          = $targetClass->fieldNames[$referencedColumnName];
415 415
 
416
-                if (! $joinColumn->getType()) {
416
+                if ( ! $joinColumn->getType()) {
417 417
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
418 418
                 }
419 419
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
                         $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
480 480
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
481 481
 
482
-                        if (! $joinColumn->getType()) {
482
+                        if ( ! $joinColumn->getType()) {
483 483
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
484 484
                         }
485 485
 
@@ -506,18 +506,18 @@  discard block
 block discarded – undo
506 506
                 case Type::SMALLINT:
507 507
                 case Type::INTEGER:
508 508
                 case Type::BIGINT:
509
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
509
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
510 510
                     break;
511 511
 
512 512
                 case Type::DATETIME:
513
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
513
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
514 514
                     break;
515 515
             }
516 516
         }
517 517
 
518
-        $sql = 'UPDATE ' . $quotedTableName
519
-             . ' SET ' . implode(', ', $set)
520
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
518
+        $sql = 'UPDATE '.$quotedTableName
519
+             . ' SET '.implode(', ', $set)
520
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
521 521
 
522 522
         $result = $this->conn->executeUpdate($sql, $params, $types);
523 523
 
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
     protected function deleteJoinTableRecords($identifier)
535 535
     {
536 536
         foreach ($this->class->getPropertiesIterator() as $association) {
537
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
537
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
538 538
                 continue;
539 539
             }
540 540
 
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
             $otherKeys         = [];
547 547
             $keys              = [];
548 548
 
549
-            if (! $owningAssociation->isOwningSide()) {
549
+            if ( ! $owningAssociation->isOwningSide()) {
550 550
                 $class             = $this->em->getClassMetadata($association->getTargetEntity());
551 551
                 $owningAssociation = $class->getProperty($association->getMappedBy());
552 552
             }
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
             }
657 657
 
658 658
             // Only owning side of x-1 associations can have a FK column.
659
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
659
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
660 660
                 continue;
661 661
             }
662 662
 
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
                 /** @var JoinColumnMetadata $joinColumn */
677 677
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
678 678
 
679
-                if (! $joinColumn->getType()) {
679
+                if ( ! $joinColumn->getType()) {
680 680
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
681 681
                 }
682 682
 
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
         $propertyName = $this->class->fieldNames[$columnName];
704 704
         $property     = $this->class->getProperty($propertyName);
705 705
 
706
-        if (! $property) {
706
+        if ( ! $property) {
707 707
             return null;
708 708
         }
709 709
 
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
             /** @var JoinColumnMetadata $joinColumn */
723 723
             $referencedColumnName = $joinColumn->getReferencedColumnName();
724 724
 
725
-            if (! $joinColumn->getType()) {
725
+            if ( ! $joinColumn->getType()) {
726 726
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
727 727
             }
728 728
 
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
             $sourceKeyColumn = $joinColumn->getReferencedColumnName();
828 828
             $targetKeyColumn = $joinColumn->getColumnName();
829 829
 
830
-            if (! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
830
+            if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
831 831
                 throw MappingException::joinColumnMustPointToMappedField(
832 832
                     $sourceClass->getClassName(),
833 833
                     $sourceKeyColumn
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
         $criteria    = [];
1055 1055
         $parameters  = [];
1056 1056
 
1057
-        if (! $association->isOwningSide()) {
1057
+        if ( ! $association->isOwningSide()) {
1058 1058
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1059 1059
             $owningAssoc = $class->getProperty($association->getMappedBy());
1060 1060
         }
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
                 $value = $value[$targetClass->identifier[0]];
1083 1083
             }
1084 1084
 
1085
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1085
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1086 1086
             $parameters[]                                       = [
1087 1087
                 'value' => $value,
1088 1088
                 'field' => $fieldName,
@@ -1132,11 +1132,11 @@  discard block
 block discarded – undo
1132 1132
 
1133 1133
         switch ($lockMode) {
1134 1134
             case LockMode::PESSIMISTIC_READ:
1135
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1135
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1136 1136
                 break;
1137 1137
 
1138 1138
             case LockMode::PESSIMISTIC_WRITE:
1139
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1139
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1140 1140
                 break;
1141 1141
         }
1142 1142
 
@@ -1147,14 +1147,14 @@  discard block
 block discarded – undo
1147 1147
 
1148 1148
         if ($filterSql !== '') {
1149 1149
             $conditionSql = $conditionSql
1150
-                ? $conditionSql . ' AND ' . $filterSql
1150
+                ? $conditionSql.' AND '.$filterSql
1151 1151
                 : $filterSql;
1152 1152
         }
1153 1153
 
1154
-        $select = 'SELECT ' . $columnList;
1155
-        $from   = ' FROM ' . $tableName . ' ' . $tableAlias;
1156
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1157
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1154
+        $select = 'SELECT '.$columnList;
1155
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1156
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1157
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1158 1158
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1159 1159
         $query  = $select
1160 1160
             . $lock
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
             . $where
1163 1163
             . $orderBySql;
1164 1164
 
1165
-        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql;
1165
+        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql;
1166 1166
     }
1167 1167
 
1168 1168
     /**
@@ -1181,13 +1181,13 @@  discard block
 block discarded – undo
1181 1181
 
1182 1182
         if ($filterSql !== '') {
1183 1183
             $conditionSql = $conditionSql
1184
-                ? $conditionSql . ' AND ' . $filterSql
1184
+                ? $conditionSql.' AND '.$filterSql
1185 1185
                 : $filterSql;
1186 1186
         }
1187 1187
 
1188 1188
         return 'SELECT COUNT(*) '
1189
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1190
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1189
+            . 'FROM '.$tableName.' '.$tableAlias
1190
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1191 1191
     }
1192 1192
 
1193 1193
     /**
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
      */
1203 1203
     final protected function getOrderBySQL(array $orderBy, $baseTableAlias)
1204 1204
     {
1205
-        if (! $orderBy) {
1205
+        if ( ! $orderBy) {
1206 1206
             return '';
1207 1207
         }
1208 1208
 
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
         foreach ($orderBy as $fieldName => $orientation) {
1212 1212
             $orientation = strtoupper(trim($orientation));
1213 1213
 
1214
-            if (! in_array($orientation, ['ASC', 'DESC'], true)) {
1214
+            if ( ! in_array($orientation, ['ASC', 'DESC'], true)) {
1215 1215
                 throw InvalidOrientation::fromClassNameAndField($this->class->getClassName(), $fieldName);
1216 1216
             }
1217 1217
 
@@ -1221,11 +1221,11 @@  discard block
 block discarded – undo
1221 1221
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1222 1222
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1223 1223
 
1224
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1224
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1225 1225
 
1226 1226
                 continue;
1227 1227
             } elseif ($property instanceof AssociationMetadata) {
1228
-                if (! $property->isOwningSide()) {
1228
+                if ( ! $property->isOwningSide()) {
1229 1229
                     throw InvalidFindByCall::fromInverseSideUsage(
1230 1230
                         $this->class->getClassName(),
1231 1231
                         $fieldName
@@ -1241,7 +1241,7 @@  discard block
 block discarded – undo
1241 1241
                     /** @var JoinColumnMetadata $joinColumn */
1242 1242
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1243 1243
 
1244
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1244
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1245 1245
                 }
1246 1246
 
1247 1247
                 continue;
@@ -1250,7 +1250,7 @@  discard block
 block discarded – undo
1250 1250
             throw UnrecognizedField::byName($fieldName);
1251 1251
         }
1252 1252
 
1253
-        return ' ORDER BY ' . implode(', ', $orderByList);
1253
+        return ' ORDER BY '.implode(', ', $orderByList);
1254 1254
     }
1255 1255
 
1256 1256
     /**
@@ -1292,7 +1292,7 @@  discard block
 block discarded – undo
1292 1292
                     $isAssocToOneInverseSide = $property instanceof ToOneAssociationMetadata && ! $property->isOwningSide();
1293 1293
                     $isAssocFromOneEager     = ! $property instanceof ManyToManyAssociationMetadata && $property->getFetchMode() === FetchMode::EAGER;
1294 1294
 
1295
-                    if (! ($isAssocFromOneEager || $isAssocToOneInverseSide)) {
1295
+                    if ( ! ($isAssocFromOneEager || $isAssocToOneInverseSide)) {
1296 1296
                         break;
1297 1297
                     }
1298 1298
 
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
                         break; // now this is why you shouldn't use inheritance
1308 1308
                     }
1309 1309
 
1310
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1310
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1311 1311
 
1312 1312
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1313 1313
 
@@ -1335,14 +1335,14 @@  discard block
 block discarded – undo
1335 1335
                         $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy());
1336 1336
                     }
1337 1337
 
1338
-                    if (! $property->isOwningSide()) {
1338
+                    if ( ! $property->isOwningSide()) {
1339 1339
                         $owningAssociation = $eagerEntity->getProperty($property->getMappedBy());
1340 1340
                     }
1341 1341
 
1342 1342
                     $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias);
1343 1343
                     $joinTableName  = $eagerEntity->table->getQuotedQualifiedName($this->platform);
1344 1344
 
1345
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property);
1345
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property);
1346 1346
 
1347 1347
                     $sourceClass      = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
1348 1348
                     $targetClass      = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
@@ -1366,7 +1366,7 @@  discard block
 block discarded – undo
1366 1366
                         $joinCondition[] = $filterSql;
1367 1367
                     }
1368 1368
 
1369
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1369
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1370 1370
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1371 1371
 
1372 1372
                     break;
@@ -1388,7 +1388,7 @@  discard block
 block discarded – undo
1388 1388
      */
1389 1389
     protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r')
1390 1390
     {
1391
-        if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1391
+        if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1392 1392
             return '';
1393 1393
         }
1394 1394
 
@@ -1403,7 +1403,7 @@  discard block
 block discarded – undo
1403 1403
             $referencedColumnName = $joinColumn->getReferencedColumnName();
1404 1404
             $resultColumnName     = $this->getSQLColumnAlias();
1405 1405
 
1406
-            if (! $joinColumn->getType()) {
1406
+            if ( ! $joinColumn->getType()) {
1407 1407
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1408 1408
             }
1409 1409
 
@@ -1433,7 +1433,7 @@  discard block
 block discarded – undo
1433 1433
         $owningAssociation = $association;
1434 1434
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1435 1435
 
1436
-        if (! $association->isOwningSide()) {
1436
+        if ( ! $association->isOwningSide()) {
1437 1437
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1438 1438
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1439 1439
         }
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
             );
1455 1455
         }
1456 1456
 
1457
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1457
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1458 1458
     }
1459 1459
 
1460 1460
     /**
@@ -1548,7 +1548,7 @@  discard block
 block discarded – undo
1548 1548
                             $columnName           = $joinColumn->getColumnName();
1549 1549
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
1550 1550
 
1551
-                            if (! $joinColumn->getType()) {
1551
+                            if ( ! $joinColumn->getType()) {
1552 1552
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1553 1553
                             }
1554 1554
 
@@ -1587,7 +1587,7 @@  discard block
 block discarded – undo
1587 1587
 
1588 1588
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1589 1589
 
1590
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1590
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1591 1591
     }
1592 1592
 
1593 1593
     /**
@@ -1601,14 +1601,14 @@  discard block
 block discarded – undo
1601 1601
     protected function getSQLTableAlias($tableName, $assocName = '')
1602 1602
     {
1603 1603
         if ($tableName) {
1604
-            $tableName .= '#' . $assocName;
1604
+            $tableName .= '#'.$assocName;
1605 1605
         }
1606 1606
 
1607 1607
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1608 1608
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1609 1609
         }
1610 1610
 
1611
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1611
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1612 1612
 
1613 1613
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1614 1614
 
@@ -1634,7 +1634,7 @@  discard block
 block discarded – undo
1634 1634
         }
1635 1635
 
1636 1636
         $lock  = $this->getLockTablesSql($lockMode);
1637
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1637
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1638 1638
         $sql   = 'SELECT 1 '
1639 1639
              . $lock
1640 1640
              . $where
@@ -1657,7 +1657,7 @@  discard block
 block discarded – undo
1657 1657
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1658 1658
 
1659 1659
         return $this->platform->appendLockHint(
1660
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1660
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1661 1661
             $lockMode
1662 1662
         );
1663 1663
     }
@@ -1707,19 +1707,19 @@  discard block
 block discarded – undo
1707 1707
 
1708 1708
             if ($comparison !== null) {
1709 1709
                 // special case null value handling
1710
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value ===null) {
1711
-                    $selectedColumns[] = $column . ' IS NULL';
1710
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value === null) {
1711
+                    $selectedColumns[] = $column.' IS NULL';
1712 1712
 
1713 1713
                     continue;
1714 1714
                 }
1715 1715
 
1716 1716
                 if ($comparison === Comparison::NEQ && $value === null) {
1717
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1717
+                    $selectedColumns[] = $column.' IS NOT NULL';
1718 1718
 
1719 1719
                     continue;
1720 1720
                 }
1721 1721
 
1722
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1722
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1723 1723
 
1724 1724
                 continue;
1725 1725
             }
@@ -1767,7 +1767,7 @@  discard block
 block discarded – undo
1767 1767
             $tableAlias = $this->getSQLTableAlias($property->getTableName());
1768 1768
             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1769 1769
 
1770
-            return [$tableAlias . '.' . $columnName];
1770
+            return [$tableAlias.'.'.$columnName];
1771 1771
         }
1772 1772
 
1773 1773
         if ($property instanceof AssociationMetadata) {
@@ -1776,7 +1776,7 @@  discard block
 block discarded – undo
1776 1776
 
1777 1777
             // Many-To-Many requires join table check for joinColumn
1778 1778
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1779
-                if (! $owningAssociation->isOwningSide()) {
1779
+                if ( ! $owningAssociation->isOwningSide()) {
1780 1780
                     $owningAssociation = $association;
1781 1781
                 }
1782 1782
 
@@ -1789,10 +1789,10 @@  discard block
 block discarded – undo
1789 1789
                 foreach ($joinColumns as $joinColumn) {
1790 1790
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1791 1791
 
1792
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1792
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1793 1793
                 }
1794 1794
             } else {
1795
-                if (! $owningAssociation->isOwningSide()) {
1795
+                if ( ! $owningAssociation->isOwningSide()) {
1796 1796
                     throw InvalidFindByCall::fromInverseSideUsage(
1797 1797
                         $this->class->getClassName(),
1798 1798
                         $field
@@ -1807,7 +1807,7 @@  discard block
 block discarded – undo
1807 1807
                 foreach ($owningAssociation->getJoinColumns() as $joinColumn) {
1808 1808
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1809 1809
 
1810
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1810
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1811 1811
                 }
1812 1812
             }
1813 1813
 
@@ -1915,7 +1915,7 @@  discard block
 block discarded – undo
1915 1915
                 $value = $value[$targetClass->identifier[0]];
1916 1916
             }
1917 1917
 
1918
-            $criteria[$tableAlias . '.' . $quotedColumnName] = $value;
1918
+            $criteria[$tableAlias.'.'.$quotedColumnName] = $value;
1919 1919
             $parameters[]                                    = [
1920 1920
                 'value' => $value,
1921 1921
                 'field' => $fieldName,
@@ -2000,7 +2000,7 @@  discard block
 block discarded – undo
2000 2000
             case $property instanceof AssociationMetadata:
2001 2001
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
2002 2002
 
2003
-                if (! $property->isOwningSide()) {
2003
+                if ( ! $property->isOwningSide()) {
2004 2004
                     $property = $class->getProperty($property->getMappedBy());
2005 2005
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
2006 2006
                 }
@@ -2013,7 +2013,7 @@  discard block
 block discarded – undo
2013 2013
                     /** @var JoinColumnMetadata $joinColumn */
2014 2014
                     $referencedColumnName = $joinColumn->getReferencedColumnName();
2015 2015
 
2016
-                    if (! $joinColumn->getType()) {
2016
+                    if ( ! $joinColumn->getType()) {
2017 2017
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
2018 2018
                     }
2019 2019
 
@@ -2028,7 +2028,7 @@  discard block
 block discarded – undo
2028 2028
         }
2029 2029
 
2030 2030
         if (is_array($value)) {
2031
-            return array_map(static function ($type) {
2031
+            return array_map(static function($type) {
2032 2032
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
2033 2033
             }, $types);
2034 2034
         }
@@ -2085,7 +2085,7 @@  discard block
 block discarded – undo
2085 2085
      */
2086 2086
     private function getIndividualValue($value)
2087 2087
     {
2088
-        if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
2088
+        if ( ! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) {
2089 2089
             return $value;
2090 2090
         }
2091 2091
 
@@ -2099,7 +2099,7 @@  discard block
 block discarded – undo
2099 2099
     {
2100 2100
         $criteria = $this->getIdentifier($entity);
2101 2101
 
2102
-        if (! $criteria) {
2102
+        if ( ! $criteria) {
2103 2103
             return false;
2104 2104
         }
2105 2105
 
@@ -2107,12 +2107,12 @@  discard block
 block discarded – undo
2107 2107
 
2108 2108
         $sql = 'SELECT 1 '
2109 2109
              . $this->getLockTablesSql(null)
2110
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2110
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2111 2111
 
2112 2112
         [$params, $types] = $this->expandParameters($criteria);
2113 2113
 
2114 2114
         if ($extraConditions !== null) {
2115
-            $sql                             .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2115
+            $sql                             .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2116 2116
             [$criteriaParams, $criteriaTypes] = $this->expandCriteriaParameters($extraConditions);
2117 2117
 
2118 2118
             $params = array_merge($params, $criteriaParams);
@@ -2122,7 +2122,7 @@  discard block
 block discarded – undo
2122 2122
         $filterSql = $this->generateFilterConditionSQL($this->class, $alias);
2123 2123
 
2124 2124
         if ($filterSql) {
2125
-            $sql .= ' AND ' . $filterSql;
2125
+            $sql .= ' AND '.$filterSql;
2126 2126
         }
2127 2127
 
2128 2128
         return (bool) $this->conn->fetchColumn($sql, $params, $types);
@@ -2135,13 +2135,13 @@  discard block
 block discarded – undo
2135 2135
      */
2136 2136
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2137 2137
     {
2138
-        if (! $association->isOwningSide()) {
2138
+        if ( ! $association->isOwningSide()) {
2139 2139
             return 'LEFT JOIN';
2140 2140
         }
2141 2141
 
2142 2142
         // if one of the join columns is nullable, return left join
2143 2143
         foreach ($association->getJoinColumns() as $joinColumn) {
2144
-            if (! $joinColumn->isNullable()) {
2144
+            if ( ! $joinColumn->isNullable()) {
2145 2145
                 continue;
2146 2146
             }
2147 2147
 
@@ -2158,7 +2158,7 @@  discard block
 block discarded – undo
2158 2158
      */
2159 2159
     public function getSQLColumnAlias()
2160 2160
     {
2161
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2161
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2162 2162
     }
2163 2163
 
2164 2164
     /**
@@ -2177,13 +2177,13 @@  discard block
 block discarded – undo
2177 2177
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
2178 2178
 
2179 2179
             if ($filterExpr !== '') {
2180
-                $filterClauses[] = '(' . $filterExpr . ')';
2180
+                $filterClauses[] = '('.$filterExpr.')';
2181 2181
             }
2182 2182
         }
2183 2183
 
2184 2184
         $sql = implode(' AND ', $filterClauses);
2185 2185
 
2186
-        return $sql ? '(' . $sql . ')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
2186
+        return $sql ? '('.$sql.')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL"
2187 2187
     }
2188 2188
 
2189 2189
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $association = $collection->getMapping();
39 39
 
40
-        if (! $association->isOwningSide()) {
40
+        if ( ! $association->isOwningSide()) {
41 41
             return; // ignore inverse side
42 42
         }
43 43
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             /** @var JoinColumnMetadata $joinColumn */
50 50
             $referencedColumnName = $joinColumn->getReferencedColumnName();
51 51
 
52
-            if (! $joinColumn->getType()) {
52
+            if ( ! $joinColumn->getType()) {
53 53
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
54 54
             }
55 55
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $association = $collection->getMapping();
71 71
 
72
-        if (! $association->isOwningSide()) {
72
+        if ( ! $association->isOwningSide()) {
73 73
             return; // ignore inverse side
74 74
         }
75 75
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         $association = $collection->getMapping();
102 102
 
103
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
103
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
104 104
             throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.');
105 105
         }
106 106
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
145 145
             $referencedColumnName = $joinColumn->getReferencedColumnName();
146 146
 
147
-            if (! $joinColumn->getType()) {
147
+            if ( ! $joinColumn->getType()) {
148 148
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em));
149 149
             }
150 150
 
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
         }*/
177 177
 
178 178
         $sql = 'SELECT COUNT(*)'
179
-            . ' FROM ' . $joinTableName . ' t'
179
+            . ' FROM '.$joinTableName.' t'
180 180
             . $joinTargetEntitySQL
181
-            . ' WHERE ' . implode(' AND ', $conditions);
181
+            . ' WHERE '.implode(' AND ', $conditions);
182 182
 
183 183
         return $this->conn->fetchColumn($sql, $params, $types);
184 184
     }
@@ -201,13 +201,13 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $association = $collection->getMapping();
203 203
 
204
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
204
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
205 205
             throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.');
206 206
         }
207 207
 
208 208
         [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictionsWithKey($collection, $key, true);
209 209
 
210
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
210
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
211 211
 
212 212
         return (bool) $this->conn->fetchColumn($sql, $params, $types);
213 213
     }
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public function contains(PersistentCollection $collection, $element)
219 219
     {
220
-        if (! $this->isValidEntityState($element)) {
220
+        if ( ! $this->isValidEntityState($element)) {
221 221
             return false;
222 222
         }
223 223
 
224 224
         [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictions($collection, $element, true);
225 225
 
226
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
226
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
227 227
 
228 228
         return (bool) $this->conn->fetchColumn($sql, $params, $types);
229 229
     }
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function removeElement(PersistentCollection $collection, $element)
235 235
     {
236
-        if (! $this->isValidEntityState($element)) {
236
+        if ( ! $this->isValidEntityState($element)) {
237 237
             return false;
238 238
         }
239 239
 
240 240
         [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictions($collection, $element, false);
241 241
 
242
-        $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
242
+        $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
243 243
 
244 244
         return (bool) $this->conn->executeUpdate($sql, $params, $types);
245 245
     }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         $onConditions  = $this->getOnConditionSQL($association);
258 258
         $whereClauses  = $params = $types = [];
259 259
 
260
-        if (! $association->isOwningSide()) {
260
+        if ( ! $association->isOwningSide()) {
261 261
             $association = $targetClass->getProperty($association->getMappedBy());
262 262
             $joinColumns = $association->getJoinTable()->getInverseJoinColumns();
263 263
         } else {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
270 270
             $referencedColumnName = $joinColumn->getReferencedColumnName();
271 271
 
272
-            if (! $joinColumn->getType()) {
272
+            if ( ! $joinColumn->getType()) {
273 273
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $ownerMetadata, $this->em));
274 274
             }
275 275
 
@@ -297,11 +297,11 @@  discard block
 block discarded – undo
297 297
 
298 298
         $resultSetMapping->addRootEntityFromClassMetadata($targetClass->getClassName(), 'te');
299 299
 
300
-        $sql = 'SELECT ' . $resultSetMapping->generateSelectClause()
301
-            . ' FROM ' . $tableName . ' te'
302
-            . ' JOIN ' . $joinTableName . ' t ON'
300
+        $sql = 'SELECT '.$resultSetMapping->generateSelectClause()
301
+            . ' FROM '.$tableName.' te'
302
+            . ' JOIN '.$joinTableName.' t ON'
303 303
             . implode(' AND ', $onConditions)
304
-            . ' WHERE ' . implode(' AND ', $whereClauses);
304
+            . ' WHERE '.implode(' AND ', $whereClauses);
305 305
 
306 306
         $sql .= $this->getOrderingSql($criteria, $targetClass);
307 307
         $sql .= $this->getLimitSql($criteria);
@@ -336,8 +336,8 @@  discard block
 block discarded – undo
336 336
 
337 337
         // A join is needed if there is filtering on the target entity
338 338
         $tableName = $rootClass->table->getQuotedQualifiedName($this->platform);
339
-        $joinSql   = ' JOIN ' . $tableName . ' te'
340
-            . ' ON' . implode(' AND ', $this->getOnConditionSQL($association));
339
+        $joinSql   = ' JOIN '.$tableName.' te'
340
+            . ' ON'.implode(' AND ', $this->getOnConditionSQL($association));
341 341
 
342 342
         return [$joinSql, $filterSql];
343 343
     }
@@ -358,18 +358,18 @@  discard block
 block discarded – undo
358 358
             $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias);
359 359
 
360 360
             if ($filterExpr) {
361
-                $filterClauses[] = '(' . $filterExpr . ')';
361
+                $filterClauses[] = '('.$filterExpr.')';
362 362
             }
363 363
         }
364 364
 
365
-        if (! $filterClauses) {
365
+        if ( ! $filterClauses) {
366 366
             return '';
367 367
         }
368 368
 
369 369
         $filterSql = implode(' AND ', $filterClauses);
370 370
 
371 371
         return isset($filterClauses[1])
372
-            ? '(' . $filterSql . ')'
372
+            ? '('.$filterSql.')'
373 373
             : $filterSql;
374 374
     }
375 375
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             $quotedColumnName           = $this->platform->quoteIdentifier($joinColumn->getColumnName());
397 397
             $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName());
398 398
 
399
-            $conditions[] = ' t.' . $quotedColumnName . ' = te.' . $quotedReferencedColumnName;
399
+            $conditions[] = ' t.'.$quotedColumnName.' = te.'.$quotedReferencedColumnName;
400 400
         }
401 401
 
402 402
         return $conditions;
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
             $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName());
419 419
         }
420 420
 
421
-        return 'DELETE FROM ' . $joinTableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
421
+        return 'DELETE FROM '.$joinTableName.' WHERE '.implode(' = ? AND ', $columns).' = ?';
422 422
     }
423 423
 
424 424
     /**
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
474 474
             $referencedColumnName = $joinColumn->getReferencedColumnName();
475 475
 
476
-            if (! $joinColumn->getType()) {
476
+            if ( ! $joinColumn->getType()) {
477 477
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
478 478
             }
479 479
 
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
487 487
             $referencedColumnName = $joinColumn->getReferencedColumnName();
488 488
 
489
-            if (! $joinColumn->getType()) {
489
+            if ( ! $joinColumn->getType()) {
490 490
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
491 491
             }
492 492
 
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
538 538
             $referencedColumnName = $joinColumn->getReferencedColumnName();
539 539
 
540
-            if (! $joinColumn->getType()) {
540
+            if ( ! $joinColumn->getType()) {
541 541
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
542 542
             }
543 543
 
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
551 551
             $referencedColumnName = $joinColumn->getReferencedColumnName();
552 552
 
553
-            if (! $joinColumn->getType()) {
553
+            if ( ! $joinColumn->getType()) {
554 554
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
555 555
             }
556 556
 
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
         $sourceClass       = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
635 635
         $targetClass       = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
636 636
 
637
-        if (! $owningAssociation->isOwningSide()) {
637
+        if ( ! $owningAssociation->isOwningSide()) {
638 638
             $owningAssociation  = $targetClass->getProperty($owningAssociation->getMappedBy());
639 639
             $joinTable          = $owningAssociation->getJoinTable();
640 640
             $joinColumns        = $joinTable->getJoinColumns();
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
         }
647 647
 
648 648
         $joinTableName   = $joinTable->getQuotedQualifiedName($this->platform);
649
-        $quotedJoinTable = $joinTableName . ' t';
649
+        $quotedJoinTable = $joinTableName.' t';
650 650
         $whereClauses    = [];
651 651
         $params          = [];
652 652
         $types           = [];
@@ -660,11 +660,11 @@  discard block
 block discarded – undo
660 660
                 $quotedColumnName           = $this->platform->quoteIdentifier($joinColumn->getColumnName());
661 661
                 $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName());
662 662
 
663
-                $joinConditions[] = ' t.' . $quotedColumnName . ' = tr.' . $quotedReferencedColumnName;
663
+                $joinConditions[] = ' t.'.$quotedColumnName.' = tr.'.$quotedReferencedColumnName;
664 664
             }
665 665
 
666 666
             $tableName        = $targetClass->table->getQuotedQualifiedName($this->platform);
667
-            $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions);
667
+            $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions);
668 668
             $indexByProperty  = $targetClass->getProperty($indexBy);
669 669
 
670 670
             switch (true) {
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
688 688
             $referencedColumnName = $joinColumn->getReferencedColumnName();
689 689
 
690
-            if (! $joinColumn->getType()) {
690
+            if ( ! $joinColumn->getType()) {
691 691
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em));
692 692
             }
693 693
 
@@ -696,13 +696,13 @@  discard block
 block discarded – undo
696 696
             $types[]        = $joinColumn->getType();
697 697
         }
698 698
 
699
-        if (! $joinNeeded) {
699
+        if ( ! $joinNeeded) {
700 700
             foreach ($joinColumns as $joinColumn) {
701 701
                 /** @var JoinColumnMetadata $joinColumn */
702 702
                 $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
703 703
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
704 704
 
705
-                if (! $joinColumn->getType()) {
705
+                if ( ! $joinColumn->getType()) {
706 706
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
707 707
                 }
708 708
 
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
             [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association);
717 717
 
718 718
             if ($filterSql) {
719
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
719
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
720 720
                 $whereClauses[]   = $filterSql;
721 721
             }
722 722
         }
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
         $association       = $collection->getMapping();
740 740
         $owningAssociation = $association;
741 741
 
742
-        if (! $association->isOwningSide()) {
742
+        if ( ! $association->isOwningSide()) {
743 743
             $sourceClass      = $this->em->getClassMetadata($association->getTargetEntity());
744 744
             $targetClass      = $this->em->getClassMetadata($association->getSourceEntity());
745 745
             $sourceIdentifier = $this->uow->getEntityIdentifier($element);
@@ -765,11 +765,11 @@  discard block
 block discarded – undo
765 765
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
766 766
             $referencedColumnName = $joinColumn->getReferencedColumnName();
767 767
 
768
-            if (! $joinColumn->getType()) {
768
+            if ( ! $joinColumn->getType()) {
769 769
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em));
770 770
             }
771 771
 
772
-            $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?';
772
+            $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?';
773 773
             $params[]       = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]];
774 774
             $types[]        = $joinColumn->getType();
775 775
         }
@@ -779,11 +779,11 @@  discard block
 block discarded – undo
779 779
             $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
780 780
             $referencedColumnName = $joinColumn->getReferencedColumnName();
781 781
 
782
-            if (! $joinColumn->getType()) {
782
+            if ( ! $joinColumn->getType()) {
783 783
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
784 784
             }
785 785
 
786
-            $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?';
786
+            $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?';
787 787
             $params[]       = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]];
788 788
             $types[]        = $joinColumn->getType();
789 789
         }
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
             [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association);
795 795
 
796 796
             if ($filterSql) {
797
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
797
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
798 798
                 $whereClauses[]   = $filterSql;
799 799
             }
800 800
         }
@@ -839,10 +839,10 @@  discard block
 block discarded – undo
839 839
                 $property   = $targetClass->getProperty($name);
840 840
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
841 841
 
842
-                $orderBy[] = $columnName . ' ' . $direction;
842
+                $orderBy[] = $columnName.' '.$direction;
843 843
             }
844 844
 
845
-            return ' ORDER BY ' . implode(', ', $orderBy);
845
+            return ' ORDER BY '.implode(', ', $orderBy);
846 846
         }
847 847
 
848 848
         return '';
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/DriverMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function getDatabasePlatform() : AbstractPlatform
36 36
     {
37
-        if (! $this->platformMock) {
37
+        if ( ! $this->platformMock) {
38 38
             $this->platformMock = new DatabasePlatformMock();
39 39
         }
40 40
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/ConnectionMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     public function quote($input, $type = ParameterType::STRING) : string
115 115
     {
116 116
         if (is_string($input)) {
117
-            return "'" . $input . "'";
117
+            return "'".$input."'";
118 118
         }
119 119
 
120 120
         return $input;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/DbalTypes/UpperCaseStringType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) : string
34 34
     {
35
-        return 'UPPER(' . $sqlExpr . ')';
35
+        return 'UPPER('.$sqlExpr.')';
36 36
     }
37 37
 
38 38
     /**
@@ -40,6 +40,6 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function convertToPHPValueSQL($sqlExpr, $platform) : string
42 42
     {
43
-        return 'LOWER(' . $sqlExpr . ')';
43
+        return 'LOWER('.$sqlExpr.')';
44 44
     }
45 45
 }
Please login to merge, or discard this patch.