Completed
Pull Request — 2.8.x (#8130)
by Gabriel
07:41
created
lib/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             $args[] = $sqlWalker->walkStringPrimary($expression);
54 54
         }
55 55
 
56
-        return call_user_func_array([$platform,'getConcatExpression'], $args);
56
+        return call_user_func_array([$platform, 'getConcatExpression'], $args);
57 57
     }
58 58
 
59 59
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Id/TableGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
                         $this->_tableName, $this->_sequenceName, $this->_allocationSize
93 93
                     );
94 94
 
95
-                    if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel+1]) !== 1) {
95
+                    if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel + 1]) !== 1) {
96 96
                         // no affected rows, concurrency issue, throw exception
97 97
                     }
98 98
                 } else {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlValueVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     /**
40 40
      * @var array
41 41
      */
42
-    private $types  = [];
42
+    private $types = [];
43 43
 
44 44
     /**
45 45
      * Converts a comparison expression into the target query language output.
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
89 89
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $updateClause->aliasIdentificationVariable);
90 90
 
91
-        $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
92
-                . ' SELECT t0.' . implode(', t0.', $idColumnNames);
91
+        $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')'
92
+                . ' SELECT t0.'.implode(', t0.', $idColumnNames);
93 93
 
94 94
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $updateClause->aliasIdentificationVariable);
95 95
         $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->_insertSql .= $sqlWalker->walkFromClause($fromClause);
98 98
 
99 99
         // 2. Create ID subselect statement used in UPDATE ... WHERE ... IN (subselect)
100
-        $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable;
100
+        $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable;
101 101
 
102 102
         // 3. Create and store UPDATE statements
103 103
         $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         foreach (array_reverse($classNames) as $className) {
107 107
             $affected = false;
108 108
             $class = $em->getClassMetadata($className);
109
-            $updateSql = 'UPDATE ' . $quoteStrategy->getTableName($class, $platform) . ' SET ';
109
+            $updateSql = 'UPDATE '.$quoteStrategy->getTableName($class, $platform).' SET ';
110 110
 
111 111
             foreach ($updateItems as $updateItem) {
112 112
                 $field = $updateItem->pathExpression->field;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
 
135 135
             if ($affected) {
136
-                $this->_sqlStatements[$i] = $updateSql . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
136
+                $this->_sqlStatements[$i] = $updateSql.' WHERE ('.$idColumnList.') IN ('.$idSubselect.')';
137 137
             }
138 138
         }
139 139
 
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
             ];
153 153
         }
154 154
 
155
-        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
156
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
155
+        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
156
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
157 157
 
158 158
         $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
159 159
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
78 78
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $primaryDqlAlias);
79 79
 
80
-        $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
81
-                . ' SELECT t0.' . implode(', t0.', $idColumnNames);
80
+        $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')'
81
+                . ' SELECT t0.'.implode(', t0.', $idColumnNames);
82 82
 
83 83
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias);
84 84
         $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]);
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         // 2. Create ID subselect statement used in DELETE ... WHERE ... IN (subselect)
93
-        $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable;
93
+        $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable;
94 94
 
95 95
         // 3. Create and store DELETE statements
96 96
         $classNames = array_merge($primaryClass->parentClasses, [$primaryClass->name], $primaryClass->subClasses);
97 97
         foreach (array_reverse($classNames) as $className) {
98 98
             $tableName = $quoteStrategy->getTableName($em->getClassMetadata($className), $platform);
99
-            $this->_sqlStatements[] = 'DELETE FROM ' . $tableName
100
-                    . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
99
+            $this->_sqlStatements[] = 'DELETE FROM '.$tableName
100
+                    . ' WHERE ('.$idColumnList.') IN ('.$idSubselect.')';
101 101
         }
102 102
 
103 103
         // 4. Store DDL for temporary identifier table.
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
                 'type'    => Type::getType(PersisterHelper::getTypeOfColumn($idColumnName, $rootClass, $em)),
109 109
             ];
110 110
         }
111
-        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
112
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
111
+        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
112
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
113 113
         $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
114 114
     }
115 115
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -444,7 +444,9 @@  discard block
 block discarded – undo
444 444
         foreach ($dqlAliases as $dqlAlias) {
445 445
             $class = $this->queryComponents[$dqlAlias]['metadata'];
446 446
 
447
-            if ( ! $class->isInheritanceTypeSingleTable()) continue;
447
+            if ( ! $class->isInheritanceTypeSingleTable()) {
448
+                continue;
449
+            }
448 450
 
449 451
             $conn   = $this->em->getConnection();
450 452
             $values = [];
@@ -782,7 +784,9 @@  discard block
 block discarded – undo
782 784
 
783 785
                 foreach ($subClass->associationMappings as $assoc) {
784 786
                     // Skip if association is inherited
785
-                    if (isset($assoc['inherited'])) continue;
787
+                    if (isset($assoc['inherited'])) {
788
+                        continue;
789
+                    }
786 790
 
787 791
                     if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
788 792
                         $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
Please login to merge, or discard this patch.
Spacing   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
      */
290 290
     public function getSQLTableAlias($tableName, $dqlAlias = '')
291 291
     {
292
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
292
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
293 293
 
294 294
         if ( ! isset($this->tableAliasMap[$tableName])) {
295 295
             $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't')
296
-                . $this->tableAliasCounter++ . '_';
296
+                . $this->tableAliasCounter++.'_';
297 297
         }
298 298
 
299 299
         return $this->tableAliasMap[$tableName];
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      */
312 312
     public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')
313 313
     {
314
-        $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : '';
314
+        $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : '';
315 315
 
316 316
         $this->tableAliasMap[$tableName] = $alias;
317 317
 
@@ -352,12 +352,12 @@  discard block
 block discarded – undo
352 352
 
353 353
             // If this is a joined association we must use left joins to preserve the correct result.
354 354
             $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER ';
355
-            $sql .= 'JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON ';
355
+            $sql .= 'JOIN '.$this->quoteStrategy->getTableName($parentClass, $this->platform).' '.$tableAlias.' ON ';
356 356
 
357 357
             $sqlParts = [];
358 358
 
359 359
             foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) {
360
-                $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName;
360
+                $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName;
361 361
             }
362 362
 
363 363
             // Add filters on the root class
@@ -378,12 +378,12 @@  discard block
 block discarded – undo
378 378
             $subClass   = $this->em->getClassMetadata($subClassName);
379 379
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
380 380
 
381
-            $sql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON ';
381
+            $sql .= ' LEFT JOIN '.$this->quoteStrategy->getTableName($subClass, $this->platform).' '.$tableAlias.' ON ';
382 382
 
383 383
             $sqlParts = [];
384 384
 
385 385
             foreach ($this->quoteStrategy->getIdentifierColumnNames($subClass, $this->platform) as $columnName) {
386
-                $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName;
386
+                $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName;
387 387
             }
388 388
 
389 389
             $sql .= implode(' AND ', $sqlParts);
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
                     ? $persister->getOwningTable($fieldName)
416 416
                     : $qComp['metadata']->getTableName();
417 417
 
418
-                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName;
418
+                $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName;
419 419
 
420 420
                 // OrderByClause should replace an ordered relation. see - DDC-2475
421 421
                 if (isset($this->orderedColumnsMap[$orderedColumn])) {
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                 }
424 424
 
425 425
                 $this->orderedColumnsMap[$orderedColumn] = $orientation;
426
-                $orderedColumns[] = $orderedColumn . ' ' . $orientation;
426
+                $orderedColumns[] = $orderedColumn.' '.$orientation;
427 427
             }
428 428
         }
429 429
 
@@ -458,15 +458,15 @@  discard block
 block discarded – undo
458 458
             }
459 459
 
460 460
             $sqlTableAlias = ($this->useSqlTableAliases)
461
-                ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.'
461
+                ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.'
462 462
                 : '';
463 463
 
464
-            $sqlParts[] = $sqlTableAlias . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')';
464
+            $sqlParts[] = $sqlTableAlias.$class->discriminatorColumn['name'].' IN ('.implode(', ', $values).')';
465 465
         }
466 466
 
467 467
         $sql = implode(' AND ', $sqlParts);
468 468
 
469
-        return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql;
469
+        return (count($sqlParts) > 1) ? '('.$sql.')' : $sql;
470 470
     }
471 471
 
472 472
     /**
@@ -479,11 +479,11 @@  discard block
 block discarded – undo
479 479
      */
480 480
     private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
481 481
     {
482
-        if (!$this->em->hasFilters()) {
482
+        if ( ! $this->em->hasFilters()) {
483 483
             return '';
484 484
         }
485 485
 
486
-        switch($targetEntity->inheritanceType) {
486
+        switch ($targetEntity->inheritanceType) {
487 487
             case ClassMetadata::INHERITANCE_TYPE_NONE:
488 488
                 break;
489 489
             case ClassMetadata::INHERITANCE_TYPE_JOINED:
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
         $filterClauses = [];
507 507
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
508 508
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
509
-                $filterClauses[] = '(' . $filterExpr . ')';
509
+                $filterClauses[] = '('.$filterExpr.')';
510 510
             }
511 511
         }
512 512
 
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
         }
539 539
 
540 540
         if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) {
541
-            $sql .= ' ORDER BY ' . $orderBySql;
541
+            $sql .= ' ORDER BY '.$orderBySql;
542 542
         }
543 543
 
544 544
         if ($limit !== null || $offset !== null) {
@@ -550,11 +550,11 @@  discard block
 block discarded – undo
550 550
         }
551 551
 
552 552
         if ($lockMode === LockMode::PESSIMISTIC_READ) {
553
-            return $sql . ' ' . $this->platform->getReadLockSQL();
553
+            return $sql.' '.$this->platform->getReadLockSQL();
554 554
         }
555 555
 
556 556
         if ($lockMode === LockMode::PESSIMISTIC_WRITE) {
557
-            return $sql . ' ' . $this->platform->getWriteLockSQL();
557
+            return $sql.' '.$this->platform->getWriteLockSQL();
558 558
         }
559 559
 
560 560
         if ($lockMode !== LockMode::OPTIMISTIC) {
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
         $sqlParts   = [];
610 610
 
611 611
         foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) {
612
-            $sqlParts[] = $tableAlias . '.' . $columnName;
612
+            $sqlParts[] = $tableAlias.'.'.$columnName;
613 613
         }
614 614
 
615 615
         return implode(', ', $sqlParts);
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
                 $class = $this->queryComponents[$dqlAlias]['metadata'];
653 653
 
654 654
                 if ($this->useSqlTableAliases) {
655
-                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.';
655
+                    $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.';
656 656
                 }
657 657
 
658 658
                 $sql .= $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
                 }
682 682
 
683 683
                 if ($this->useSqlTableAliases) {
684
-                    $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.';
684
+                    $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.';
685 685
                 }
686 686
 
687 687
                 $sql .= reset($assoc['targetToSourceKeyColumns']);
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
      */
700 700
     public function walkSelectClause($selectClause)
701 701
     {
702
-        $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '');
702
+        $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : '');
703 703
         $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions));
704 704
 
705 705
         if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) {
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
                 $discrColumn = $rootClass->discriminatorColumn;
737 737
                 $columnAlias = $this->getSQLColumnAlias($discrColumn['name']);
738 738
 
739
-                $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias;
739
+                $sqlSelectExpressions[] = $tblAlias.'.'.$discrColumn['name'].' AS '.$columnAlias;
740 740
 
741 741
                 $this->rsm->setDiscriminatorColumn($dqlAlias, $columnAlias);
742 742
                 $this->rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName'], false, $discrColumn['type']);
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
             // Add foreign key columns of class and also parent classes
751 751
             foreach ($class->associationMappings as $assoc) {
752 752
                 if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)
753
-                    || ( ! $addMetaColumns && !isset($assoc['id']))) {
753
+                    || ( ! $addMetaColumns && ! isset($assoc['id']))) {
754 754
                     continue;
755 755
                 }
756 756
 
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
                     $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
766 766
 
767 767
                     $quotedColumnName       = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
768
-                    $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias;
768
+                    $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias;
769 769
 
770 770
                     $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType);
771 771
                 }
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
                             $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
795 795
 
796 796
                             $quotedColumnName       = $this->quoteStrategy->getJoinColumnName($joinColumn, $subClass, $this->platform);
797
-                            $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias;
797
+                            $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias;
798 798
 
799 799
                             $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType);
800 800
                         }
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl);
821 821
         }
822 822
 
823
-        return ' FROM ' . implode(', ', $sqlParts);
823
+        return ' FROM '.implode(', ', $sqlParts);
824 824
     }
825 825
 
826 826
     /**
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
         }
898 898
 
899 899
         $sql = $this->platform->appendLockHint(
900
-            $this->quoteStrategy->getTableName($class, $this->platform) . ' ' .
900
+            $this->quoteStrategy->getTableName($class, $this->platform).' '.
901 901
             $this->getSQLTableAlias($class->getTableName(), $dqlAlias),
902 902
             $this->query->getHint(Query::HINT_LOCK_MODE)
903 903
         );
@@ -909,10 +909,10 @@  discard block
 block discarded – undo
909 909
         $classTableInheritanceJoins = $this->_generateClassTableInheritanceJoins($class, $dqlAlias);
910 910
 
911 911
         if ( ! $buildNestedJoins) {
912
-            return $sql . $classTableInheritanceJoins;
912
+            return $sql.$classTableInheritanceJoins;
913 913
         }
914 914
 
915
-        return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')';
915
+        return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')';
916 916
     }
917 917
 
918 918
     /**
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
         // Ensure we got the owning side, since it has all mapping info
946 946
         $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation;
947 947
 
948
-        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
948
+        if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) {
949 949
             if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) {
950 950
                 throw QueryException::iterateWithFetchJoinNotAllowed($assoc);
951 951
             }
@@ -965,12 +965,12 @@  discard block
 block discarded – undo
965 965
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
966 966
 
967 967
                     if ($relation['isOwningSide']) {
968
-                        $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn;
968
+                        $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn;
969 969
 
970 970
                         continue;
971 971
                     }
972 972
 
973
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn;
973
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn;
974 974
                 }
975 975
 
976 976
                 // Apply remaining inheritance restrictions
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
                 }
989 989
 
990 990
                 $targetTableJoin = [
991
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
991
+                    'table' => $targetTableName.' '.$targetTableAlias,
992 992
                     'condition' => implode(' AND ', $conditions),
993 993
                 ];
994 994
                 break;
@@ -1008,10 +1008,10 @@  discard block
 block discarded – undo
1008 1008
                     $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
1009 1009
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
1010 1010
 
1011
-                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1011
+                    $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
1012 1012
                 }
1013 1013
 
1014
-                $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1014
+                $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions);
1015 1015
 
1016 1016
                 // Join target table
1017 1017
                 $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
                     $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
1026 1026
                     $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
1027 1027
 
1028
-                    $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1028
+                    $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn;
1029 1029
                 }
1030 1030
 
1031 1031
                 // Apply remaining inheritance restrictions
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
                 }
1044 1044
 
1045 1045
                 $targetTableJoin = [
1046
-                    'table' => $targetTableName . ' ' . $targetTableAlias,
1046
+                    'table' => $targetTableName.' '.$targetTableAlias,
1047 1047
                     'condition' => implode(' AND ', $conditions),
1048 1048
                 ];
1049 1049
                 break;
@@ -1053,22 +1053,22 @@  discard block
 block discarded – undo
1053 1053
         }
1054 1054
 
1055 1055
         // Handle WITH clause
1056
-        $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')');
1056
+        $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')');
1057 1057
 
1058 1058
         if ($targetClass->isInheritanceTypeJoined()) {
1059 1059
             $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
1060 1060
             // If we have WITH condition, we need to build nested joins for target class table and cti joins
1061 1061
             if ($withCondition) {
1062
-                $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition'];
1062
+                $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition'];
1063 1063
             } else {
1064
-                $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins;
1064
+                $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins;
1065 1065
             }
1066 1066
         } else {
1067
-            $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'];
1067
+            $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'];
1068 1068
         }
1069 1069
 
1070 1070
         if ($withCondition) {
1071
-            $sql .= ' AND ' . $withCondition;
1071
+            $sql .= ' AND '.$withCondition;
1072 1072
         }
1073 1073
 
1074 1074
         // Apply the indexes
@@ -1101,7 +1101,7 @@  discard block
 block discarded – undo
1101 1101
             $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
1102 1102
         }
1103 1103
 
1104
-        return ' ORDER BY ' . implode(', ', $orderByItems);
1104
+        return ' ORDER BY '.implode(', ', $orderByItems);
1105 1105
     }
1106 1106
 
1107 1107
     /**
@@ -1118,10 +1118,10 @@  discard block
 block discarded – undo
1118 1118
         $this->orderedColumnsMap[$sql] = $type;
1119 1119
 
1120 1120
         if ($expr instanceof AST\Subselect) {
1121
-            return '(' . $sql . ') ' . $type;
1121
+            return '('.$sql.') '.$type;
1122 1122
         }
1123 1123
 
1124
-        return $sql . ' ' . $type;
1124
+        return $sql.' '.$type;
1125 1125
     }
1126 1126
 
1127 1127
     /**
@@ -1129,7 +1129,7 @@  discard block
 block discarded – undo
1129 1129
      */
1130 1130
     public function walkHavingClause($havingClause)
1131 1131
     {
1132
-        return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression);
1132
+        return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression);
1133 1133
     }
1134 1134
 
1135 1135
     /**
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
                 $conditions = [];
1153 1153
 
1154 1154
                 if ($join->conditionalExpression) {
1155
-                    $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')';
1155
+                    $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')';
1156 1156
                 }
1157 1157
 
1158 1158
                 $isUnconditionalJoin = empty($conditions);
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
                     ? ' AND '
1161 1161
                     : ' ON ';
1162 1162
 
1163
-                $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, !$isUnconditionalJoin);
1163
+                $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, ! $isUnconditionalJoin);
1164 1164
 
1165 1165
                 // Apply remaining inheritance restrictions
1166 1166
                 $discrSql = $this->_generateDiscriminatorColumnConditionSQL([$dqlAlias]);
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
                 }
1178 1178
 
1179 1179
                 if ($conditions) {
1180
-                    $sql .= $condExprConjunction . implode(' AND ', $conditions);
1180
+                    $sql .= $condExprConjunction.implode(' AND ', $conditions);
1181 1181
                 }
1182 1182
 
1183 1183
                 break;
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
1208 1208
         }
1209 1209
 
1210
-        $sql .= implode(', ', $scalarExpressions) . ')';
1210
+        $sql .= implode(', ', $scalarExpressions).')';
1211 1211
 
1212 1212
         return $sql;
1213 1213
     }
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
             ? $this->conn->quote($nullIfExpression->secondExpression)
1230 1230
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
1231 1231
 
1232
-        return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
1232
+        return 'NULLIF('.$firstExpression.', '.$secondExpression.')';
1233 1233
     }
1234 1234
 
1235 1235
     /**
@@ -1244,11 +1244,11 @@  discard block
 block discarded – undo
1244 1244
         $sql = 'CASE';
1245 1245
 
1246 1246
         foreach ($generalCaseExpression->whenClauses as $whenClause) {
1247
-            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
1248
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1247
+            $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression);
1248
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
1249 1249
         }
1250 1250
 
1251
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
1251
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END';
1252 1252
 
1253 1253
         return $sql;
1254 1254
     }
@@ -1262,14 +1262,14 @@  discard block
 block discarded – undo
1262 1262
      */
1263 1263
     public function walkSimpleCaseExpression($simpleCaseExpression)
1264 1264
     {
1265
-        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1265
+        $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
1266 1266
 
1267 1267
         foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
1268
-            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1269
-            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1268
+            $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
1269
+            $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
1270 1270
         }
1271 1271
 
1272
-        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
1272
+        $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END';
1273 1273
 
1274 1274
         return $sql;
1275 1275
     }
@@ -1303,14 +1303,14 @@  discard block
 block discarded – undo
1303 1303
                 $fieldMapping  = $class->fieldMappings[$fieldName];
1304 1304
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
1305 1305
                 $columnAlias   = $this->getSQLColumnAlias($fieldMapping['columnName']);
1306
-                $col           = $sqlTableAlias . '.' . $columnName;
1306
+                $col           = $sqlTableAlias.'.'.$columnName;
1307 1307
 
1308 1308
                 if (isset($fieldMapping['requireSQLConversion'])) {
1309 1309
                     $type = Type::getType($fieldMapping['type']);
1310 1310
                     $col  = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform());
1311 1311
                 }
1312 1312
 
1313
-                $sql .= $col . ' AS ' . $columnAlias;
1313
+                $sql .= $col.' AS '.$columnAlias;
1314 1314
 
1315 1315
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1316 1316
 
@@ -1335,7 +1335,7 @@  discard block
 block discarded – undo
1335 1335
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1336 1336
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1337 1337
 
1338
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1338
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1339 1339
 
1340 1340
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1341 1341
 
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
                     break;
1344 1344
                 }
1345 1345
 
1346
-                if (! $expr instanceof Query\AST\TypedExpression) {
1346
+                if ( ! $expr instanceof Query\AST\TypedExpression) {
1347 1347
                     // Conceptually we could resolve field type here by traverse through AST to retrieve field type,
1348 1348
                     // but this is not a feasible solution; assume 'string'.
1349 1349
                     $this->rsm->addScalarResult($columnAlias, $resultAlias, 'string');
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1360 1360
                 $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1361 1361
 
1362
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1362
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1363 1363
 
1364 1364
                 $this->scalarResultAliasMap[$resultAlias] = $columnAlias;
1365 1365
 
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
                 break;
1371 1371
 
1372 1372
             case ($expr instanceof AST\NewObjectExpression):
1373
-                $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable);
1373
+                $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable);
1374 1374
                 break;
1375 1375
 
1376 1376
             default:
@@ -1411,14 +1411,14 @@  discard block
 block discarded – undo
1411 1411
                     $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
1412 1412
                     $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform);
1413 1413
 
1414
-                    $col = $sqlTableAlias . '.' . $quotedColumnName;
1414
+                    $col = $sqlTableAlias.'.'.$quotedColumnName;
1415 1415
 
1416 1416
                     if (isset($mapping['requireSQLConversion'])) {
1417 1417
                         $type = Type::getType($mapping['type']);
1418 1418
                         $col = $type->convertToPHPValueSQL($col, $this->platform);
1419 1419
                     }
1420 1420
 
1421
-                    $sqlParts[] = $col . ' AS '. $columnAlias;
1421
+                    $sqlParts[] = $col.' AS '.$columnAlias;
1422 1422
 
1423 1423
                     $this->scalarResultAliasMap[$resultAlias][] = $columnAlias;
1424 1424
 
@@ -1435,21 +1435,21 @@  discard block
 block discarded – undo
1435 1435
                         $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
1436 1436
 
1437 1437
                         foreach ($subClass->fieldMappings as $fieldName => $mapping) {
1438
-                            if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) {
1438
+                            if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) {
1439 1439
                                 continue;
1440 1440
                             }
1441 1441
 
1442 1442
                             $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
1443 1443
                             $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform);
1444 1444
 
1445
-                            $col = $sqlTableAlias . '.' . $quotedColumnName;
1445
+                            $col = $sqlTableAlias.'.'.$quotedColumnName;
1446 1446
 
1447 1447
                             if (isset($mapping['requireSQLConversion'])) {
1448 1448
                                 $type = Type::getType($mapping['type']);
1449 1449
                                 $col = $type->convertToPHPValueSQL($col, $this->platform);
1450 1450
                             }
1451 1451
 
1452
-                            $sqlParts[] = $col . ' AS ' . $columnAlias;
1452
+                            $sqlParts[] = $col.' AS '.$columnAlias;
1453 1453
 
1454 1454
                             $this->scalarResultAliasMap[$resultAlias][] = $columnAlias;
1455 1455
 
@@ -1469,7 +1469,7 @@  discard block
 block discarded – undo
1469 1469
      */
1470 1470
     public function walkQuantifiedExpression($qExpr)
1471 1471
     {
1472
-        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
1472
+        return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')';
1473 1473
     }
1474 1474
 
1475 1475
     /**
@@ -1509,7 +1509,7 @@  discard block
 block discarded – undo
1509 1509
             $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl);
1510 1510
         }
1511 1511
 
1512
-        return ' FROM ' . implode(', ', $sqlParts);
1512
+        return ' FROM '.implode(', ', $sqlParts);
1513 1513
     }
1514 1514
 
1515 1515
     /**
@@ -1517,7 +1517,7 @@  discard block
 block discarded – undo
1517 1517
      */
1518 1518
     public function walkSimpleSelectClause($simpleSelectClause)
1519 1519
     {
1520
-        return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1520
+        return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '')
1521 1521
             . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression);
1522 1522
     }
1523 1523
 
@@ -1536,10 +1536,10 @@  discard block
 block discarded – undo
1536 1536
      * @param null|string               $newObjectResultAlias
1537 1537
      * @return string The SQL.
1538 1538
      */
1539
-    public function walkNewObject($newObjectExpression, $newObjectResultAlias=null)
1539
+    public function walkNewObject($newObjectExpression, $newObjectResultAlias = null)
1540 1540
     {
1541 1541
         $sqlSelectExpressions = [];
1542
-        $objIndex             = $newObjectResultAlias?:$this->newObjectCounter++;
1542
+        $objIndex             = $newObjectResultAlias ?: $this->newObjectCounter++;
1543 1543
 
1544 1544
         foreach ($newObjectExpression->args as $argIndex => $e) {
1545 1545
             $resultAlias = $this->scalarResultCounter++;
@@ -1552,7 +1552,7 @@  discard block
 block discarded – undo
1552 1552
                     break;
1553 1553
 
1554 1554
                 case ($e instanceof AST\Subselect):
1555
-                    $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias;
1555
+                    $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias;
1556 1556
                     break;
1557 1557
 
1558 1558
                 case ($e instanceof AST\PathExpression):
@@ -1561,7 +1561,7 @@  discard block
 block discarded – undo
1561 1561
                     $class     = $qComp['metadata'];
1562 1562
                     $fieldType = $class->fieldMappings[$e->field]['type'];
1563 1563
 
1564
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1564
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1565 1565
                     break;
1566 1566
 
1567 1567
                 case ($e instanceof AST\Literal):
@@ -1575,11 +1575,11 @@  discard block
 block discarded – undo
1575 1575
                             break;
1576 1576
                     }
1577 1577
 
1578
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1578
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1579 1579
                     break;
1580 1580
 
1581 1581
                 default:
1582
-                    $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias;
1582
+                    $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias;
1583 1583
                     break;
1584 1584
             }
1585 1585
 
@@ -1612,10 +1612,10 @@  discard block
 block discarded – undo
1612 1612
             case ($expr instanceof AST\Subselect):
1613 1613
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++;
1614 1614
 
1615
-                $columnAlias = 'sclr' . $this->aliasCounter++;
1615
+                $columnAlias = 'sclr'.$this->aliasCounter++;
1616 1616
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1617 1617
 
1618
-                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1618
+                $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias;
1619 1619
                 break;
1620 1620
 
1621 1621
             case ($expr instanceof AST\Functions\FunctionNode):
@@ -1632,7 +1632,7 @@  discard block
 block discarded – undo
1632 1632
                 $columnAlias = $this->getSQLColumnAlias('sclr');
1633 1633
                 $this->scalarResultAliasMap[$alias] = $columnAlias;
1634 1634
 
1635
-                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
1635
+                $sql .= $expr->dispatch($this).' AS '.$columnAlias;
1636 1636
                 break;
1637 1637
 
1638 1638
             case ($expr instanceof AST\ParenthesisExpression):
@@ -1652,8 +1652,8 @@  discard block
 block discarded – undo
1652 1652
      */
1653 1653
     public function walkAggregateExpression($aggExpression)
1654 1654
     {
1655
-        return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '')
1656
-            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')';
1655
+        return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '')
1656
+            . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')';
1657 1657
     }
1658 1658
 
1659 1659
     /**
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
             $sqlParts[] = $this->walkGroupByItem($groupByItem);
1668 1668
         }
1669 1669
 
1670
-        return ' GROUP BY ' . implode(', ', $sqlParts);
1670
+        return ' GROUP BY '.implode(', ', $sqlParts);
1671 1671
     }
1672 1672
 
1673 1673
     /**
@@ -1724,7 +1724,7 @@  discard block
 block discarded – undo
1724 1724
     {
1725 1725
         $class     = $this->em->getClassMetadata($deleteClause->abstractSchemaName);
1726 1726
         $tableName = $class->getTableName();
1727
-        $sql       = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform);
1727
+        $sql       = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform);
1728 1728
 
1729 1729
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1730 1730
         $this->rootAliases[] = $deleteClause->aliasIdentificationVariable;
@@ -1739,12 +1739,12 @@  discard block
 block discarded – undo
1739 1739
     {
1740 1740
         $class     = $this->em->getClassMetadata($updateClause->abstractSchemaName);
1741 1741
         $tableName = $class->getTableName();
1742
-        $sql       = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform);
1742
+        $sql       = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform);
1743 1743
 
1744 1744
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1745 1745
         $this->rootAliases[] = $updateClause->aliasIdentificationVariable;
1746 1746
 
1747
-        $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1747
+        $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems));
1748 1748
 
1749 1749
         return $sql;
1750 1750
     }
@@ -1757,7 +1757,7 @@  discard block
 block discarded – undo
1757 1757
         $useTableAliasesBefore = $this->useSqlTableAliases;
1758 1758
         $this->useSqlTableAliases = false;
1759 1759
 
1760
-        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
1760
+        $sql      = $this->walkPathExpression($updateItem->pathExpression).' = ';
1761 1761
         $newValue = $updateItem->newValue;
1762 1762
 
1763 1763
         switch (true) {
@@ -1800,7 +1800,7 @@  discard block
 block discarded – undo
1800 1800
 
1801 1801
             if (count($filterClauses)) {
1802 1802
                 if ($condSql) {
1803
-                    $condSql = '(' . $condSql . ') AND ';
1803
+                    $condSql = '('.$condSql.') AND ';
1804 1804
                 }
1805 1805
 
1806 1806
                 $condSql .= implode(' AND ', $filterClauses);
@@ -1808,11 +1808,11 @@  discard block
 block discarded – undo
1808 1808
         }
1809 1809
 
1810 1810
         if ($condSql) {
1811
-            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1811
+            return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql);
1812 1812
         }
1813 1813
 
1814 1814
         if ($discrSql) {
1815
-            return ' WHERE ' . $discrSql;
1815
+            return ' WHERE '.$discrSql;
1816 1816
         }
1817 1817
 
1818 1818
         return '';
@@ -1855,7 +1855,7 @@  discard block
 block discarded – undo
1855 1855
         // if only one ConditionalPrimary is defined
1856 1856
         return ( ! ($factor instanceof AST\ConditionalFactor))
1857 1857
             ? $this->walkConditionalPrimary($factor)
1858
-            : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary);
1858
+            : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary);
1859 1859
     }
1860 1860
 
1861 1861
     /**
@@ -1870,7 +1870,7 @@  discard block
 block discarded – undo
1870 1870
         if ($primary->isConditionalExpression()) {
1871 1871
             $condExpr = $primary->conditionalExpression;
1872 1872
 
1873
-            return '(' . $this->walkConditionalExpression($condExpr) . ')';
1873
+            return '('.$this->walkConditionalExpression($condExpr).')';
1874 1874
         }
1875 1875
     }
1876 1876
 
@@ -1881,7 +1881,7 @@  discard block
 block discarded – undo
1881 1881
     {
1882 1882
         $sql = ($existsExpr->not) ? 'NOT ' : '';
1883 1883
 
1884
-        $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')';
1884
+        $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')';
1885 1885
 
1886 1886
         return $sql;
1887 1887
     }
@@ -1925,7 +1925,7 @@  discard block
 block discarded – undo
1925 1925
             $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
1926 1926
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1927 1927
 
1928
-            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE ';
1928
+            $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE ';
1929 1929
 
1930 1930
             $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']];
1931 1931
             $sqlParts    = [];
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) {
1934 1934
                 $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform);
1935 1935
 
1936
-                $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn;
1936
+                $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn;
1937 1937
             }
1938 1938
 
1939 1939
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1941,7 +1941,7 @@  discard block
 block discarded – undo
1941 1941
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1942 1942
                 }
1943 1943
 
1944
-                $sqlParts[] = $targetTableAlias . '.'  . $targetColumnName . ' = ' . $entitySql;
1944
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql;
1945 1945
             }
1946 1946
 
1947 1947
             $sql .= implode(' AND ', $sqlParts);
@@ -1957,8 +1957,8 @@  discard block
 block discarded – undo
1957 1957
             $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
1958 1958
 
1959 1959
             // join to target table
1960
-            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias
1961
-                . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON ';
1960
+            $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias
1961
+                . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON ';
1962 1962
 
1963 1963
             // join conditions
1964 1964
             $joinColumns  = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns'];
@@ -1967,7 +1967,7 @@  discard block
 block discarded – undo
1967 1967
             foreach ($joinColumns as $joinColumn) {
1968 1968
                 $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform);
1969 1969
 
1970
-                $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn;
1970
+                $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn;
1971 1971
             }
1972 1972
 
1973 1973
             $sql .= implode(' AND ', $joinSqlParts);
@@ -1979,7 +1979,7 @@  discard block
 block discarded – undo
1979 1979
             foreach ($joinColumns as $joinColumn) {
1980 1980
                 $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform);
1981 1981
 
1982
-                $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn;
1982
+                $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn;
1983 1983
             }
1984 1984
 
1985 1985
             foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) {
@@ -1987,13 +1987,13 @@  discard block
 block discarded – undo
1987 1987
                     $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++);
1988 1988
                 }
1989 1989
 
1990
-                $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')';
1990
+                $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')';
1991 1991
             }
1992 1992
 
1993 1993
             $sql .= implode(' AND ', $sqlParts);
1994 1994
         }
1995 1995
 
1996
-        return $sql . ')';
1996
+        return $sql.')';
1997 1997
     }
1998 1998
 
1999 1999
     /**
@@ -2004,7 +2004,7 @@  discard block
 block discarded – undo
2004 2004
         $sizeFunc = new AST\Functions\SizeFunction('size');
2005 2005
         $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression;
2006 2006
 
2007
-        return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2007
+        return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0');
2008 2008
     }
2009 2009
 
2010 2010
     /**
@@ -2013,19 +2013,19 @@  discard block
 block discarded – undo
2013 2013
     public function walkNullComparisonExpression($nullCompExpr)
2014 2014
     {
2015 2015
         $expression = $nullCompExpr->expression;
2016
-        $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL';
2016
+        $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL';
2017 2017
 
2018 2018
         // Handle ResultVariable
2019 2019
         if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) {
2020
-            return $this->walkResultVariable($expression) . $comparison;
2020
+            return $this->walkResultVariable($expression).$comparison;
2021 2021
         }
2022 2022
 
2023 2023
         // Handle InputParameter mapping inclusion to ParserResult
2024 2024
         if ($expression instanceof AST\InputParameter) {
2025
-            return $this->walkInputParameter($expression) . $comparison;
2025
+            return $this->walkInputParameter($expression).$comparison;
2026 2026
         }
2027 2027
 
2028
-        return $expression->dispatch($this) . $comparison;
2028
+        return $expression->dispatch($this).$comparison;
2029 2029
     }
2030 2030
 
2031 2031
     /**
@@ -2033,7 +2033,7 @@  discard block
 block discarded – undo
2033 2033
      */
2034 2034
     public function walkInExpression($inExpr)
2035 2035
     {
2036
-        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
2036
+        $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN (';
2037 2037
 
2038 2038
         $sql .= ($inExpr->subselect)
2039 2039
             ? $this->walkSubselect($inExpr->subselect)
@@ -2060,10 +2060,10 @@  discard block
 block discarded – undo
2060 2060
         }
2061 2061
 
2062 2062
         if ($this->useSqlTableAliases) {
2063
-            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.';
2063
+            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.';
2064 2064
         }
2065 2065
 
2066
-        $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
2066
+        $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
2067 2067
         $sql .= $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr);
2068 2068
 
2069 2069
         return $sql;
@@ -2110,8 +2110,8 @@  discard block
 block discarded – undo
2110 2110
             $sql .= ' NOT';
2111 2111
         }
2112 2112
 
2113
-        $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2114
-            . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2113
+        $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression)
2114
+            . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression);
2115 2115
 
2116 2116
         return $sql;
2117 2117
     }
@@ -2126,7 +2126,7 @@  discard block
 block discarded – undo
2126 2126
             ? $this->walkResultVariable($stringExpr)
2127 2127
             : $stringExpr->dispatch($this);
2128 2128
 
2129
-        $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';
2129
+        $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE ';
2130 2130
 
2131 2131
         if ($likeExpr->stringPattern instanceof AST\InputParameter) {
2132 2132
             $sql .= $this->walkInputParameter($likeExpr->stringPattern);
@@ -2139,7 +2139,7 @@  discard block
 block discarded – undo
2139 2139
         }
2140 2140
 
2141 2141
         if ($likeExpr->escapeChar) {
2142
-            $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar);
2142
+            $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar);
2143 2143
         }
2144 2144
 
2145 2145
         return $sql;
@@ -2166,7 +2166,7 @@  discard block
 block discarded – undo
2166 2166
             ? $leftExpr->dispatch($this)
2167 2167
             : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr));
2168 2168
 
2169
-        $sql .= ' ' . $compExpr->operator . ' ';
2169
+        $sql .= ' '.$compExpr->operator.' ';
2170 2170
 
2171 2171
         $sql .= ($rightExpr instanceof AST\Node)
2172 2172
             ? $rightExpr->dispatch($this)
@@ -2198,7 +2198,7 @@  discard block
 block discarded – undo
2198 2198
     {
2199 2199
         return ($arithmeticExpr->isSimpleArithmeticExpression())
2200 2200
             ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression)
2201
-            : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')';
2201
+            : '('.$this->walkSubselect($arithmeticExpr->subselect).')';
2202 2202
     }
2203 2203
 
2204 2204
     /**
@@ -2252,7 +2252,7 @@  discard block
 block discarded – undo
2252 2252
 
2253 2253
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
2254 2254
 
2255
-        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
2255
+        return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary);
2256 2256
     }
2257 2257
 
2258 2258
     /**
@@ -2265,7 +2265,7 @@  discard block
 block discarded – undo
2265 2265
     public function walkArithmeticPrimary($primary)
2266 2266
     {
2267 2267
         if ($primary instanceof AST\SimpleArithmeticExpression) {
2268
-            return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
2268
+            return '('.$this->walkSimpleArithmeticExpression($primary).')';
2269 2269
         }
2270 2270
 
2271 2271
         if ($primary instanceof AST\Node) {
@@ -2329,6 +2329,6 @@  discard block
 block discarded – undo
2329 2329
             $sqlParameterList[] = $this->conn->quote($dis);
2330 2330
         }
2331 2331
 
2332
-        return '(' . implode(', ', $sqlParameterList) . ')';
2332
+        return '('.implode(', ', $sqlParameterList).')';
2333 2333
     }
2334 2334
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Literal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     /**
34 34
      * @var string
35 35
      */
36
-    protected $preSeparator  = '';
36
+    protected $preSeparator = '';
37 37
 
38 38
     /**
39 39
      * @var string
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $schema = [];
76 76
         foreach ($this->from as $path) {
77 77
             if (is_dir($path)) {
78
-                $files = glob($path . '/*.yml');
78
+                $files = glob($path.'/*.yml');
79 79
                 foreach ($files as $file) {
80 80
                     $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file)));
81 81
                 }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
239 239
 
240 240
             $definition = [
241
-                'sequenceName' => is_array($column['sequence']) ? $column['sequence']['name']:$column['sequence']
241
+                'sequenceName' => is_array($column['sequence']) ? $column['sequence']['name'] : $column['sequence']
242 242
             ];
243 243
 
244 244
             if (isset($column['sequence']['size'])) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/EntityGenerator.php 3 patches
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1525,11 +1525,21 @@
 block discarded – undo
1525 1525
             if ($associationMapping['cascade']) {
1526 1526
                 $cascades = [];
1527 1527
 
1528
-                if ($associationMapping['isCascadePersist']) $cascades[] = '"persist"';
1529
-                if ($associationMapping['isCascadeRemove']) $cascades[] = '"remove"';
1530
-                if ($associationMapping['isCascadeDetach']) $cascades[] = '"detach"';
1531
-                if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"';
1532
-                if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"';
1528
+                if ($associationMapping['isCascadePersist']) {
1529
+                    $cascades[] = '"persist"';
1530
+                }
1531
+                if ($associationMapping['isCascadeRemove']) {
1532
+                    $cascades[] = '"remove"';
1533
+                }
1534
+                if ($associationMapping['isCascadeDetach']) {
1535
+                    $cascades[] = '"detach"';
1536
+                }
1537
+                if ($associationMapping['isCascadeMerge']) {
1538
+                    $cascades[] = '"merge"';
1539
+                }
1540
+                if ($associationMapping['isCascadeRefresh']) {
1541
+                    $cascades[] = '"refresh"';
1542
+                }
1533 1543
 
1534 1544
                 if (count($cascades) === 5) {
1535 1545
                     $cascades = ['"all"'];
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1299,7 +1299,7 @@  discard block
 block discarded – undo
1299 1299
 
1300 1300
             $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata);
1301 1301
             $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName']
1302
-                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1302
+                        . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1303 1303
         }
1304 1304
 
1305 1305
         return implode("\n", $lines);
@@ -1395,14 +1395,14 @@  discard block
 block discarded – undo
1395 1395
         }
1396 1396
 
1397 1397
         $replacements = [
1398
-          '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1399
-          '<methodTypeHint>'    => $methodTypeHint,
1400
-          '<variableType>'      => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''),
1401
-          '<variableName>'      => $variableName,
1402
-          '<methodName>'        => $methodName,
1403
-          '<fieldName>'         => $fieldName,
1404
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '',
1405
-          '<entity>'            => $this->getClassName($metadata)
1398
+            '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1399
+            '<methodTypeHint>'    => $methodTypeHint,
1400
+            '<variableType>'      => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''),
1401
+            '<variableName>'      => $variableName,
1402
+            '<methodName>'        => $methodName,
1403
+            '<fieldName>'         => $fieldName,
1404
+            '<variableDefault>'   => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '',
1405
+            '<entity>'            => $this->getClassName($metadata)
1406 1406
         ];
1407 1407
 
1408 1408
         $method = str_replace(
Please login to merge, or discard this patch.
Spacing   +151 added lines, -151 removed lines patch added patch discarded remove patch
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      */
341 341
     public function __construct()
342 342
     {
343
-        @trigger_error(self::class . ' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED);
343
+        @trigger_error(self::class.' is deprecated and will be removed in Doctrine ORM 3.0', E_USER_DEPRECATED);
344 344
 
345 345
         if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) {
346 346
             $this->annotationsPrefix = 'ORM\\';
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
      */
375 375
     public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
376 376
     {
377
-        $path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name) . $this->extension;
377
+        $path = $outputDirectory.'/'.str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name).$this->extension;
378 378
         $dir = dirname($path);
379 379
 
380 380
         if ( ! is_dir($dir)) {
@@ -390,8 +390,8 @@  discard block
 block discarded – undo
390 390
         }
391 391
 
392 392
         if ($this->backupExisting && file_exists($path)) {
393
-            $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~";
394
-            if (!copy($path, $backupPath)) {
393
+            $backupPath = dirname($path).DIRECTORY_SEPARATOR.basename($path)."~";
394
+            if ( ! copy($path, $backupPath)) {
395 395
                 throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed.");
396 396
             }
397 397
         }
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
         $body = str_replace('<spaces>', $this->spaces, $body);
453 453
         $last = strrpos($currentCode, '}');
454 454
 
455
-        return substr($currentCode, 0, $last) . $body . ($body ? "\n" : '') . "}\n";
455
+        return substr($currentCode, 0, $last).$body.($body ? "\n" : '')."}\n";
456 456
     }
457 457
 
458 458
     /**
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
     public function setFieldVisibility($visibility)
517 517
     {
518 518
         if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) {
519
-            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility);
519
+            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility);
520 520
         }
521 521
 
522 522
         $this->fieldVisibility = $visibility;
@@ -613,11 +613,11 @@  discard block
 block discarded – undo
613 613
      */
614 614
     protected function generateEntityNamespace(ClassMetadataInfo $metadata)
615 615
     {
616
-        if (! $this->hasNamespace($metadata)) {
616
+        if ( ! $this->hasNamespace($metadata)) {
617 617
             return '';
618 618
         }
619 619
 
620
-        return 'namespace ' . $this->getNamespace($metadata) .';';
620
+        return 'namespace '.$this->getNamespace($metadata).';';
621 621
     }
622 622
 
623 623
     /**
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
      */
626 626
     protected function generateEntityUse()
627 627
     {
628
-        if (! $this->generateAnnotations) {
628
+        if ( ! $this->generateAnnotations) {
629 629
             return '';
630 630
         }
631 631
 
@@ -639,8 +639,8 @@  discard block
 block discarded – undo
639 639
      */
640 640
     protected function generateEntityClassName(ClassMetadataInfo $metadata)
641 641
     {
642
-        return 'class ' . $this->getClassName($metadata) .
643
-            ($this->extendsClass() ? ' extends ' . $this->getClassToExtendName() : null);
642
+        return 'class '.$this->getClassName($metadata).
643
+            ($this->extendsClass() ? ' extends '.$this->getClassToExtendName() : null);
644 644
     }
645 645
 
646 646
     /**
@@ -742,13 +742,13 @@  discard block
 block discarded – undo
742 742
         $fieldMappings = array_merge($requiredFields, $optionalFields);
743 743
 
744 744
         foreach ($metadata->embeddedClasses as $fieldName => $embeddedClass) {
745
-            $paramType = '\\' . ltrim($embeddedClass['class'], '\\');
746
-            $paramVariable = '$' . $fieldName;
745
+            $paramType = '\\'.ltrim($embeddedClass['class'], '\\');
746
+            $paramVariable = '$'.$fieldName;
747 747
 
748 748
             $paramTypes[] = $paramType;
749 749
             $paramVariables[] = $paramVariable;
750
-            $params[] = $paramType . ' ' . $paramVariable;
751
-            $fields[] = '$this->' . $fieldName . ' = ' . $paramVariable . ';';
750
+            $params[] = $paramType.' '.$paramVariable;
751
+            $fields[] = '$this->'.$fieldName.' = '.$paramVariable.';';
752 752
         }
753 753
 
754 754
         foreach ($fieldMappings as $fieldMapping) {
@@ -756,27 +756,27 @@  discard block
 block discarded – undo
756 756
                 continue;
757 757
             }
758 758
 
759
-            $paramTypes[] = $this->getType($fieldMapping['type']) . (!empty($fieldMapping['nullable']) ? '|null' : '');
760
-            $param = '$' . $fieldMapping['fieldName'];
759
+            $paramTypes[] = $this->getType($fieldMapping['type']).( ! empty($fieldMapping['nullable']) ? '|null' : '');
760
+            $param = '$'.$fieldMapping['fieldName'];
761 761
             $paramVariables[] = $param;
762 762
 
763 763
             if ($fieldMapping['type'] === 'datetime') {
764
-                $param = $this->getType($fieldMapping['type']) . ' ' . $param;
764
+                $param = $this->getType($fieldMapping['type']).' '.$param;
765 765
             }
766 766
 
767
-            if (!empty($fieldMapping['nullable'])) {
767
+            if ( ! empty($fieldMapping['nullable'])) {
768 768
                 $param .= ' = null';
769 769
             }
770 770
 
771 771
             $params[] = $param;
772 772
 
773
-            $fields[] = '$this->' . $fieldMapping['fieldName'] . ' = $' . $fieldMapping['fieldName'] . ';';
773
+            $fields[] = '$this->'.$fieldMapping['fieldName'].' = $'.$fieldMapping['fieldName'].';';
774 774
         }
775 775
 
776 776
         $maxParamTypeLength = max(array_map('strlen', $paramTypes));
777 777
         $paramTags = array_map(
778
-            function ($type, $variable) use ($maxParamTypeLength) {
779
-                return '@param ' . $type . str_repeat(' ', $maxParamTypeLength - strlen($type) + 1) . $variable;
778
+            function($type, $variable) use ($maxParamTypeLength) {
779
+                return '@param '.$type.str_repeat(' ', $maxParamTypeLength - strlen($type) + 1).$variable;
780 780
             },
781 781
             $paramTypes,
782 782
             $paramVariables
@@ -784,8 +784,8 @@  discard block
 block discarded – undo
784 784
 
785 785
         // Generate multi line constructor if the signature exceeds 120 characters.
786 786
         if (array_sum(array_map('strlen', $params)) + count($params) * 2 + 29 > 120) {
787
-            $delimiter = "\n" . $this->spaces;
788
-            $params = $delimiter . implode(',' . $delimiter, $params) . "\n";
787
+            $delimiter = "\n".$this->spaces;
788
+            $params = $delimiter.implode(','.$delimiter, $params)."\n";
789 789
         } else {
790 790
             $params = implode(', ', $params);
791 791
         }
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
         $replacements = [
794 794
             '<paramTags>' => implode("\n * ", $paramTags),
795 795
             '<params>'    => $params,
796
-            '<fields>'    => implode("\n" . $this->spaces, $fields),
796
+            '<fields>'    => implode("\n".$this->spaces, $fields),
797 797
         ];
798 798
 
799 799
         $constructor = str_replace(
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
 
839 839
             if ($inClass) {
840 840
                 $inClass = false;
841
-                $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1];
841
+                $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1];
842 842
                 $this->staticReflection[$lastSeenClass]['properties'] = [];
843 843
                 $this->staticReflection[$lastSeenClass]['methods'] = [];
844 844
             }
@@ -846,16 +846,16 @@  discard block
 block discarded – undo
846 846
             if (T_NAMESPACE === $token[0]) {
847 847
                 $lastSeenNamespace = '';
848 848
                 $inNamespace = true;
849
-            } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i-1][0]) {
849
+            } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i - 1][0]) {
850 850
                 $inClass = true;
851 851
             } elseif (T_FUNCTION === $token[0]) {
852
-                if (T_STRING === $tokens[$i+2][0]) {
853
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]);
854
-                } elseif ($tokens[$i+2] == '&' && T_STRING === $tokens[$i+3][0]) {
855
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]);
852
+                if (T_STRING === $tokens[$i + 2][0]) {
853
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]);
854
+                } elseif ($tokens[$i + 2] == '&' && T_STRING === $tokens[$i + 3][0]) {
855
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]);
856 856
                 }
857
-            } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i+2][0]) {
858
-                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1);
857
+            } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i + 2][0]) {
858
+                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1);
859 859
             }
860 860
         }
861 861
     }
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
      */
869 869
     protected function hasProperty($property, ClassMetadataInfo $metadata)
870 870
     {
871
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) {
871
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) {
872 872
             // don't generate property if its already on the base class.
873 873
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name);
874 874
             if ($reflClass->hasProperty($property)) {
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
      */
898 898
     protected function hasMethod($method, ClassMetadataInfo $metadata)
899 899
     {
900
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) {
900
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) {
901 901
             // don't generate method if its already on the base class.
902 902
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name);
903 903
 
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
      */
929 929
     protected function getTraits(ClassMetadataInfo $metadata)
930 930
     {
931
-        if (! ($metadata->reflClass !== null || class_exists($metadata->name))) {
931
+        if ( ! ($metadata->reflClass !== null || class_exists($metadata->name))) {
932 932
             return [];
933 933
         }
934 934
 
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
     {
979 979
         $refl = new \ReflectionClass($this->getClassToExtend());
980 980
 
981
-        return '\\' . $refl->getName();
981
+        return '\\'.$refl->getName();
982 982
     }
983 983
 
984 984
     /**
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
     {
1012 1012
         $lines = [];
1013 1013
         $lines[] = '/**';
1014
-        $lines[] = ' * ' . $this->getClassName($metadata);
1014
+        $lines[] = ' * '.$this->getClassName($metadata);
1015 1015
 
1016 1016
         if ($this->generateAnnotations) {
1017 1017
             $lines[] = ' *';
@@ -1027,12 +1027,12 @@  discard block
 block discarded – undo
1027 1027
 
1028 1028
             foreach ($methods as $method) {
1029 1029
                 if ($code = $this->$method($metadata)) {
1030
-                    $lines[] = ' * ' . $code;
1030
+                    $lines[] = ' * '.$code;
1031 1031
                 }
1032 1032
             }
1033 1033
 
1034 1034
             if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
1035
-                $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks';
1035
+                $lines[] = ' * @'.$this->annotationsPrefix.'HasLifecycleCallbacks';
1036 1036
             }
1037 1037
         }
1038 1038
 
@@ -1048,17 +1048,17 @@  discard block
 block discarded – undo
1048 1048
      */
1049 1049
     protected function generateEntityAnnotation(ClassMetadataInfo $metadata)
1050 1050
     {
1051
-        $prefix = '@' . $this->annotationsPrefix;
1051
+        $prefix = '@'.$this->annotationsPrefix;
1052 1052
 
1053 1053
         if ($metadata->isEmbeddedClass) {
1054
-            return $prefix . 'Embeddable';
1054
+            return $prefix.'Embeddable';
1055 1055
         }
1056 1056
 
1057 1057
         $customRepository = $metadata->customRepositoryClassName
1058
-            ? '(repositoryClass="' . $metadata->customRepositoryClassName . '")'
1058
+            ? '(repositoryClass="'.$metadata->customRepositoryClassName.'")'
1059 1059
             : '';
1060 1060
 
1061
-        return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository;
1061
+        return $prefix.($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity').$customRepository;
1062 1062
     }
1063 1063
 
1064 1064
     /**
@@ -1075,28 +1075,28 @@  discard block
 block discarded – undo
1075 1075
         $table = [];
1076 1076
 
1077 1077
         if (isset($metadata->table['schema'])) {
1078
-            $table[] = 'schema="' . $metadata->table['schema'] . '"';
1078
+            $table[] = 'schema="'.$metadata->table['schema'].'"';
1079 1079
         }
1080 1080
 
1081 1081
         if (isset($metadata->table['name'])) {
1082
-            $table[] = 'name="' . $metadata->table['name'] . '"';
1082
+            $table[] = 'name="'.$metadata->table['name'].'"';
1083 1083
         }
1084 1084
 
1085 1085
         if (isset($metadata->table['options']) && $metadata->table['options']) {
1086
-            $table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}';
1086
+            $table[] = 'options={'.$this->exportTableOptions((array) $metadata->table['options']).'}';
1087 1087
         }
1088 1088
 
1089 1089
         if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
1090 1090
             $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']);
1091
-            $table[] = 'uniqueConstraints={' . $constraints . '}';
1091
+            $table[] = 'uniqueConstraints={'.$constraints.'}';
1092 1092
         }
1093 1093
 
1094 1094
         if (isset($metadata->table['indexes']) && $metadata->table['indexes']) {
1095 1095
             $constraints = $this->generateTableConstraints('Index', $metadata->table['indexes']);
1096
-            $table[] = 'indexes={' . $constraints . '}';
1096
+            $table[] = 'indexes={'.$constraints.'}';
1097 1097
         }
1098 1098
 
1099
-        return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
1099
+        return '@'.$this->annotationsPrefix.'Table('.implode(', ', $table).')';
1100 1100
     }
1101 1101
 
1102 1102
     /**
@@ -1111,9 +1111,9 @@  discard block
 block discarded – undo
1111 1111
         foreach ($constraints as $name => $constraint) {
1112 1112
             $columns = [];
1113 1113
             foreach ($constraint['columns'] as $column) {
1114
-                $columns[] = '"' . $column . '"';
1114
+                $columns[] = '"'.$column.'"';
1115 1115
             }
1116
-            $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})';
1116
+            $annotations[] = '@'.$this->annotationsPrefix.$constraintName.'(name="'.$name.'", columns={'.implode(', ', $columns).'})';
1117 1117
         }
1118 1118
 
1119 1119
         return implode(', ', $annotations);
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
             return '';
1131 1131
         }
1132 1132
 
1133
-        return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1133
+        return '@'.$this->annotationsPrefix.'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1134 1134
     }
1135 1135
 
1136 1136
     /**
@@ -1145,11 +1145,11 @@  discard block
 block discarded – undo
1145 1145
         }
1146 1146
 
1147 1147
         $discrColumn = $metadata->discriminatorColumn;
1148
-        $columnDefinition = 'name="' . $discrColumn['name']
1149
-            . '", type="' . $discrColumn['type']
1150
-            . '", length=' . $discrColumn['length'];
1148
+        $columnDefinition = 'name="'.$discrColumn['name']
1149
+            . '", type="'.$discrColumn['type']
1150
+            . '", length='.$discrColumn['length'];
1151 1151
 
1152
-        return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')';
1152
+        return '@'.$this->annotationsPrefix.'DiscriminatorColumn('.$columnDefinition.')';
1153 1153
     }
1154 1154
 
1155 1155
     /**
@@ -1166,10 +1166,10 @@  discard block
 block discarded – undo
1166 1166
         $inheritanceClassMap = [];
1167 1167
 
1168 1168
         foreach ($metadata->discriminatorMap as $type => $class) {
1169
-            $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"';
1169
+            $inheritanceClassMap[] .= '"'.$type.'" = "'.$class.'"';
1170 1170
         }
1171 1171
 
1172
-        return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})';
1172
+        return '@'.$this->annotationsPrefix.'DiscriminatorMap({'.implode(', ', $inheritanceClassMap).'})';
1173 1173
     }
1174 1174
 
1175 1175
     /**
@@ -1188,8 +1188,8 @@  discard block
 block discarded – undo
1188 1188
 
1189 1189
             $nullableField = $this->nullableFieldExpression($fieldMapping);
1190 1190
 
1191
-            if ((!$metadata->isEmbeddedClass || !$this->embeddablesImmutable)
1192
-                && (!isset($fieldMapping['id']) || ! $fieldMapping['id'] || $metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_NONE)
1191
+            if (( ! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable)
1192
+                && ( ! isset($fieldMapping['id']) || ! $fieldMapping['id'] || $metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_NONE)
1193 1193
                 && $code = $this->generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'], $nullableField)
1194 1194
             ) {
1195 1195
                 $methods[] = $code;
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
         }
1261 1261
 
1262 1262
         foreach ($joinColumns as $joinColumn) {
1263
-            if (isset($joinColumn['nullable']) && !$joinColumn['nullable']) {
1263
+            if (isset($joinColumn['nullable']) && ! $joinColumn['nullable']) {
1264 1264
                 return false;
1265 1265
             }
1266 1266
         }
@@ -1305,8 +1305,8 @@  discard block
 block discarded – undo
1305 1305
             }
1306 1306
 
1307 1307
             $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata);
1308
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName']
1309
-                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1308
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$associationMapping['fieldName']
1309
+                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null).";\n";
1310 1310
         }
1311 1311
 
1312 1312
         return implode("\n", $lines);
@@ -1334,12 +1334,12 @@  discard block
 block discarded – undo
1334 1334
                 if ($fieldMapping['type'] === 'boolean' && $fieldMapping['options']['default'] === '1') {
1335 1335
                     $defaultValue = ' = true';
1336 1336
                 } else {
1337
-                    $defaultValue = ' = ' . var_export($fieldMapping['options']['default'], true);
1337
+                    $defaultValue = ' = '.var_export($fieldMapping['options']['default'], true);
1338 1338
                 }
1339 1339
             }
1340 1340
 
1341 1341
             $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
1342
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName'] . $defaultValue . ";\n";
1342
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldMapping['fieldName'].$defaultValue.";\n";
1343 1343
         }
1344 1344
 
1345 1345
         return implode("\n", $lines);
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
             }
1361 1361
 
1362 1362
             $lines[] = $this->generateEmbeddedPropertyDocBlock($embeddedClass);
1363
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . ";\n";
1363
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldName.";\n";
1364 1364
         }
1365 1365
 
1366 1366
         return implode("\n", $lines);
@@ -1377,7 +1377,7 @@  discard block
 block discarded – undo
1377 1377
      */
1378 1378
     protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null)
1379 1379
     {
1380
-        $methodName = $type . Inflector::classify($fieldName);
1380
+        $methodName = $type.Inflector::classify($fieldName);
1381 1381
         $variableName = Inflector::camelize($fieldName);
1382 1382
         if (in_array($type, ["add", "remove"])) {
1383 1383
             $methodName = Inflector::singularize($methodName);
@@ -1397,18 +1397,18 @@  discard block
 block discarded – undo
1397 1397
         $variableType   = $typeHint ? $this->getType($typeHint) : null;
1398 1398
 
1399 1399
         if ($typeHint && ! isset($types[$typeHint])) {
1400
-            $variableType   =  '\\' . ltrim($variableType, '\\');
1401
-            $methodTypeHint =  '\\' . $typeHint . ' ';
1400
+            $variableType   = '\\'.ltrim($variableType, '\\');
1401
+            $methodTypeHint = '\\'.$typeHint.' ';
1402 1402
         }
1403 1403
 
1404 1404
         $replacements = [
1405
-          '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1405
+          '<description>'       => ucfirst($type).' '.$variableName.'.',
1406 1406
           '<methodTypeHint>'    => $methodTypeHint,
1407
-          '<variableType>'      => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''),
1407
+          '<variableType>'      => $variableType.(null !== $defaultValue ? ('|'.$defaultValue) : ''),
1408 1408
           '<variableName>'      => $variableName,
1409 1409
           '<methodName>'        => $methodName,
1410 1410
           '<fieldName>'         => $fieldName,
1411
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '',
1411
+          '<variableDefault>'   => ($defaultValue !== null) ? (' = '.$defaultValue) : '',
1412 1412
           '<entity>'            => $this->getClassName($metadata)
1413 1413
         ];
1414 1414
 
@@ -1437,7 +1437,7 @@  discard block
 block discarded – undo
1437 1437
         $this->staticReflection[$metadata->name]['methods'][] = $methodName;
1438 1438
 
1439 1439
         $replacements = [
1440
-            '<name>'        => $this->annotationsPrefix . ucfirst($name),
1440
+            '<name>'        => $this->annotationsPrefix.ucfirst($name),
1441 1441
             '<methodName>'  => $methodName,
1442 1442
         ];
1443 1443
 
@@ -1460,30 +1460,30 @@  discard block
 block discarded – undo
1460 1460
         $joinColumnAnnot = [];
1461 1461
 
1462 1462
         if (isset($joinColumn['name'])) {
1463
-            $joinColumnAnnot[] = 'name="' . $joinColumn['name'] . '"';
1463
+            $joinColumnAnnot[] = 'name="'.$joinColumn['name'].'"';
1464 1464
         }
1465 1465
 
1466 1466
         if (isset($joinColumn['referencedColumnName'])) {
1467
-            $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn['referencedColumnName'] . '"';
1467
+            $joinColumnAnnot[] = 'referencedColumnName="'.$joinColumn['referencedColumnName'].'"';
1468 1468
         }
1469 1469
 
1470 1470
         if (isset($joinColumn['unique']) && $joinColumn['unique']) {
1471
-            $joinColumnAnnot[] = 'unique=' . ($joinColumn['unique'] ? 'true' : 'false');
1471
+            $joinColumnAnnot[] = 'unique='.($joinColumn['unique'] ? 'true' : 'false');
1472 1472
         }
1473 1473
 
1474 1474
         if (isset($joinColumn['nullable'])) {
1475
-            $joinColumnAnnot[] = 'nullable=' . ($joinColumn['nullable'] ? 'true' : 'false');
1475
+            $joinColumnAnnot[] = 'nullable='.($joinColumn['nullable'] ? 'true' : 'false');
1476 1476
         }
1477 1477
 
1478 1478
         if (isset($joinColumn['onDelete'])) {
1479
-            $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"');
1479
+            $joinColumnAnnot[] = 'onDelete="'.($joinColumn['onDelete'].'"');
1480 1480
         }
1481 1481
 
1482 1482
         if (isset($joinColumn['columnDefinition'])) {
1483
-            $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn['columnDefinition'] . '"';
1483
+            $joinColumnAnnot[] = 'columnDefinition="'.$joinColumn['columnDefinition'].'"';
1484 1484
         }
1485 1485
 
1486
-        return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')';
1486
+        return '@'.$this->annotationsPrefix.'JoinColumn('.implode(', ', $joinColumnAnnot).')';
1487 1487
     }
1488 1488
 
1489 1489
     /**
@@ -1495,22 +1495,22 @@  discard block
 block discarded – undo
1495 1495
     protected function generateAssociationMappingPropertyDocBlock(array $associationMapping, ClassMetadataInfo $metadata)
1496 1496
     {
1497 1497
         $lines = [];
1498
-        $lines[] = $this->spaces . '/**';
1498
+        $lines[] = $this->spaces.'/**';
1499 1499
 
1500 1500
         if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) {
1501
-            $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection';
1501
+            $lines[] = $this->spaces.' * @var \Doctrine\Common\Collections\Collection';
1502 1502
         } else {
1503
-            $lines[] = $this->spaces . ' * @var \\' . ltrim($associationMapping['targetEntity'], '\\');
1503
+            $lines[] = $this->spaces.' * @var \\'.ltrim($associationMapping['targetEntity'], '\\');
1504 1504
         }
1505 1505
 
1506 1506
         if ($this->generateAnnotations) {
1507
-            $lines[] = $this->spaces . ' *';
1507
+            $lines[] = $this->spaces.' *';
1508 1508
 
1509 1509
             if (isset($associationMapping['id']) && $associationMapping['id']) {
1510
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1510
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1511 1511
 
1512 1512
                 if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
1513
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1513
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1514 1514
                 }
1515 1515
             }
1516 1516
 
@@ -1532,15 +1532,15 @@  discard block
 block discarded – undo
1532 1532
             $typeOptions = [];
1533 1533
 
1534 1534
             if (isset($associationMapping['targetEntity'])) {
1535
-                $typeOptions[] = 'targetEntity="' . $associationMapping['targetEntity'] . '"';
1535
+                $typeOptions[] = 'targetEntity="'.$associationMapping['targetEntity'].'"';
1536 1536
             }
1537 1537
 
1538 1538
             if (isset($associationMapping['inversedBy'])) {
1539
-                $typeOptions[] = 'inversedBy="' . $associationMapping['inversedBy'] . '"';
1539
+                $typeOptions[] = 'inversedBy="'.$associationMapping['inversedBy'].'"';
1540 1540
             }
1541 1541
 
1542 1542
             if (isset($associationMapping['mappedBy'])) {
1543
-                $typeOptions[] = 'mappedBy="' . $associationMapping['mappedBy'] . '"';
1543
+                $typeOptions[] = 'mappedBy="'.$associationMapping['mappedBy'].'"';
1544 1544
             }
1545 1545
 
1546 1546
             if ($associationMapping['cascade']) {
@@ -1556,11 +1556,11 @@  discard block
 block discarded – undo
1556 1556
                     $cascades = ['"all"'];
1557 1557
                 }
1558 1558
 
1559
-                $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
1559
+                $typeOptions[] = 'cascade={'.implode(',', $cascades).'}';
1560 1560
             }
1561 1561
 
1562 1562
             if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval']) {
1563
-                $typeOptions[] = 'orphanRemoval=' . ($associationMapping['orphanRemoval'] ? 'true' : 'false');
1563
+                $typeOptions[] = 'orphanRemoval='.($associationMapping['orphanRemoval'] ? 'true' : 'false');
1564 1564
             }
1565 1565
 
1566 1566
             if (isset($associationMapping['fetch']) && $associationMapping['fetch'] !== ClassMetadataInfo::FETCH_LAZY) {
@@ -1569,71 +1569,71 @@  discard block
 block discarded – undo
1569 1569
                     ClassMetadataInfo::FETCH_EAGER      => 'EAGER',
1570 1570
                 ];
1571 1571
 
1572
-                $typeOptions[] = 'fetch="' . $fetchMap[$associationMapping['fetch']] . '"';
1572
+                $typeOptions[] = 'fetch="'.$fetchMap[$associationMapping['fetch']].'"';
1573 1573
             }
1574 1574
 
1575
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')';
1575
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.''.$type.'('.implode(', ', $typeOptions).')';
1576 1576
 
1577 1577
             if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) {
1578
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({';
1578
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinColumns({';
1579 1579
 
1580 1580
                 $joinColumnsLines = [];
1581 1581
 
1582 1582
                 foreach ($associationMapping['joinColumns'] as $joinColumn) {
1583 1583
                     if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) {
1584
-                        $joinColumnsLines[] = $this->spaces . ' *   ' . $joinColumnAnnot;
1584
+                        $joinColumnsLines[] = $this->spaces.' *   '.$joinColumnAnnot;
1585 1585
                     }
1586 1586
                 }
1587 1587
 
1588 1588
                 $lines[] = implode(",\n", $joinColumnsLines);
1589
-                $lines[] = $this->spaces . ' * })';
1589
+                $lines[] = $this->spaces.' * })';
1590 1590
             }
1591 1591
 
1592 1592
             if (isset($associationMapping['joinTable']) && $associationMapping['joinTable']) {
1593 1593
                 $joinTable = [];
1594
-                $joinTable[] = 'name="' . $associationMapping['joinTable']['name'] . '"';
1594
+                $joinTable[] = 'name="'.$associationMapping['joinTable']['name'].'"';
1595 1595
 
1596 1596
                 if (isset($associationMapping['joinTable']['schema'])) {
1597
-                    $joinTable[] = 'schema="' . $associationMapping['joinTable']['schema'] . '"';
1597
+                    $joinTable[] = 'schema="'.$associationMapping['joinTable']['schema'].'"';
1598 1598
                 }
1599 1599
 
1600
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTable) . ',';
1601
-                $lines[] = $this->spaces . ' *   joinColumns={';
1600
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinTable('.implode(', ', $joinTable).',';
1601
+                $lines[] = $this->spaces.' *   joinColumns={';
1602 1602
 
1603 1603
                 $joinColumnsLines = [];
1604 1604
 
1605 1605
                 foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) {
1606
-                    $joinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1606
+                    $joinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1607 1607
                 }
1608 1608
 
1609
-                $lines[] = implode(",". PHP_EOL, $joinColumnsLines);
1610
-                $lines[] = $this->spaces . ' *   },';
1611
-                $lines[] = $this->spaces . ' *   inverseJoinColumns={';
1609
+                $lines[] = implode(",".PHP_EOL, $joinColumnsLines);
1610
+                $lines[] = $this->spaces.' *   },';
1611
+                $lines[] = $this->spaces.' *   inverseJoinColumns={';
1612 1612
 
1613 1613
                 $inverseJoinColumnsLines = [];
1614 1614
 
1615 1615
                 foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $joinColumn) {
1616
-                    $inverseJoinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1616
+                    $inverseJoinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1617 1617
                 }
1618 1618
 
1619
-                $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines);
1620
-                $lines[] = $this->spaces . ' *   }';
1621
-                $lines[] = $this->spaces . ' * )';
1619
+                $lines[] = implode(",".PHP_EOL, $inverseJoinColumnsLines);
1620
+                $lines[] = $this->spaces.' *   }';
1621
+                $lines[] = $this->spaces.' * )';
1622 1622
             }
1623 1623
 
1624 1624
             if (isset($associationMapping['orderBy'])) {
1625
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({';
1625
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'OrderBy({';
1626 1626
 
1627 1627
                 foreach ($associationMapping['orderBy'] as $name => $direction) {
1628
-                    $lines[] = $this->spaces . ' *     "' . $name . '"="' . $direction . '",';
1628
+                    $lines[] = $this->spaces.' *     "'.$name.'"="'.$direction.'",';
1629 1629
                 }
1630 1630
 
1631 1631
                 $lines[count($lines) - 1] = substr($lines[count($lines) - 1], 0, strlen($lines[count($lines) - 1]) - 1);
1632
-                $lines[] = $this->spaces . ' * })';
1632
+                $lines[] = $this->spaces.' * })';
1633 1633
             }
1634 1634
         }
1635 1635
 
1636
-        $lines[] = $this->spaces . ' */';
1636
+        $lines[] = $this->spaces.' */';
1637 1637
 
1638 1638
         return implode("\n", $lines);
1639 1639
     }
@@ -1647,43 +1647,43 @@  discard block
 block discarded – undo
1647 1647
     protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, ClassMetadataInfo $metadata)
1648 1648
     {
1649 1649
         $lines = [];
1650
-        $lines[] = $this->spaces . '/**';
1651
-        $lines[] = $this->spaces . ' * @var '
1650
+        $lines[] = $this->spaces.'/**';
1651
+        $lines[] = $this->spaces.' * @var '
1652 1652
             . $this->getType($fieldMapping['type'])
1653 1653
             . ($this->nullableFieldExpression($fieldMapping) ? '|null' : '');
1654 1654
 
1655 1655
         if ($this->generateAnnotations) {
1656
-            $lines[] = $this->spaces . ' *';
1656
+            $lines[] = $this->spaces.' *';
1657 1657
 
1658 1658
             $column = [];
1659 1659
             if (isset($fieldMapping['columnName'])) {
1660
-                $column[] = 'name="' . $fieldMapping['columnName'] . '"';
1660
+                $column[] = 'name="'.$fieldMapping['columnName'].'"';
1661 1661
             }
1662 1662
 
1663 1663
             if (isset($fieldMapping['type'])) {
1664
-                $column[] = 'type="' . $fieldMapping['type'] . '"';
1664
+                $column[] = 'type="'.$fieldMapping['type'].'"';
1665 1665
             }
1666 1666
 
1667 1667
             if (isset($fieldMapping['length'])) {
1668
-                $column[] = 'length=' . $fieldMapping['length'];
1668
+                $column[] = 'length='.$fieldMapping['length'];
1669 1669
             }
1670 1670
 
1671 1671
             if (isset($fieldMapping['precision'])) {
1672
-                $column[] = 'precision=' .  $fieldMapping['precision'];
1672
+                $column[] = 'precision='.$fieldMapping['precision'];
1673 1673
             }
1674 1674
 
1675 1675
             if (isset($fieldMapping['scale'])) {
1676
-                $column[] = 'scale=' . $fieldMapping['scale'];
1676
+                $column[] = 'scale='.$fieldMapping['scale'];
1677 1677
             }
1678 1678
 
1679 1679
             if (isset($fieldMapping['nullable'])) {
1680
-                $column[] = 'nullable=' .  var_export($fieldMapping['nullable'], true);
1680
+                $column[] = 'nullable='.var_export($fieldMapping['nullable'], true);
1681 1681
             }
1682 1682
 
1683 1683
             $options = [];
1684 1684
 
1685 1685
             if (isset($fieldMapping['options']['default']) && $fieldMapping['options']['default']) {
1686
-                $options[] = '"default"="' . $fieldMapping['options']['default'] .'"';
1686
+                $options[] = '"default"="'.$fieldMapping['options']['default'].'"';
1687 1687
             }
1688 1688
 
1689 1689
             if (isset($fieldMapping['options']['unsigned']) && $fieldMapping['options']['unsigned']) {
@@ -1695,15 +1695,15 @@  discard block
 block discarded – undo
1695 1695
             }
1696 1696
 
1697 1697
             if (isset($fieldMapping['options']['comment']) && $fieldMapping['options']['comment']) {
1698
-                $options[] = '"comment"="' . str_replace('"', '""', $fieldMapping['options']['comment']) . '"';
1698
+                $options[] = '"comment"="'.str_replace('"', '""', $fieldMapping['options']['comment']).'"';
1699 1699
             }
1700 1700
 
1701 1701
             if (isset($fieldMapping['options']['collation']) && $fieldMapping['options']['collation']) {
1702
-                $options[] = '"collation"="' . $fieldMapping['options']['collation'] .'"';
1702
+                $options[] = '"collation"="'.$fieldMapping['options']['collation'].'"';
1703 1703
             }
1704 1704
 
1705 1705
             if (isset($fieldMapping['options']['check']) && $fieldMapping['options']['check']) {
1706
-                $options[] = '"check"="' . $fieldMapping['options']['check'] .'"';
1706
+                $options[] = '"check"="'.$fieldMapping['options']['check'].'"';
1707 1707
             }
1708 1708
 
1709 1709
             if ($options) {
@@ -1711,47 +1711,47 @@  discard block
 block discarded – undo
1711 1711
             }
1712 1712
 
1713 1713
             if (isset($fieldMapping['columnDefinition'])) {
1714
-                $column[] = 'columnDefinition="' . $fieldMapping['columnDefinition'] . '"';
1714
+                $column[] = 'columnDefinition="'.$fieldMapping['columnDefinition'].'"';
1715 1715
             }
1716 1716
 
1717 1717
             if (isset($fieldMapping['unique'])) {
1718
-                $column[] = 'unique=' . var_export($fieldMapping['unique'], true);
1718
+                $column[] = 'unique='.var_export($fieldMapping['unique'], true);
1719 1719
             }
1720 1720
 
1721
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')';
1721
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Column('.implode(', ', $column).')';
1722 1722
 
1723 1723
             if (isset($fieldMapping['id']) && $fieldMapping['id']) {
1724
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1724
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1725 1725
 
1726 1726
                 if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
1727
-                    $lines[] = $this->spaces.' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1727
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1728 1728
                 }
1729 1729
 
1730 1730
                 if ($metadata->sequenceGeneratorDefinition) {
1731 1731
                     $sequenceGenerator = [];
1732 1732
 
1733 1733
                     if (isset($metadata->sequenceGeneratorDefinition['sequenceName'])) {
1734
-                        $sequenceGenerator[] = 'sequenceName="' . $metadata->sequenceGeneratorDefinition['sequenceName'] . '"';
1734
+                        $sequenceGenerator[] = 'sequenceName="'.$metadata->sequenceGeneratorDefinition['sequenceName'].'"';
1735 1735
                     }
1736 1736
 
1737 1737
                     if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) {
1738
-                        $sequenceGenerator[] = 'allocationSize=' . $metadata->sequenceGeneratorDefinition['allocationSize'];
1738
+                        $sequenceGenerator[] = 'allocationSize='.$metadata->sequenceGeneratorDefinition['allocationSize'];
1739 1739
                     }
1740 1740
 
1741 1741
                     if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) {
1742
-                        $sequenceGenerator[] = 'initialValue=' . $metadata->sequenceGeneratorDefinition['initialValue'];
1742
+                        $sequenceGenerator[] = 'initialValue='.$metadata->sequenceGeneratorDefinition['initialValue'];
1743 1743
                     }
1744 1744
 
1745
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')';
1745
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'SequenceGenerator('.implode(', ', $sequenceGenerator).')';
1746 1746
                 }
1747 1747
             }
1748 1748
 
1749 1749
             if (isset($fieldMapping['version']) && $fieldMapping['version']) {
1750
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version';
1750
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Version';
1751 1751
             }
1752 1752
         }
1753 1753
 
1754
-        $lines[] = $this->spaces . ' */';
1754
+        $lines[] = $this->spaces.' */';
1755 1755
 
1756 1756
         return implode("\n", $lines);
1757 1757
     }
@@ -1764,27 +1764,27 @@  discard block
 block discarded – undo
1764 1764
     protected function generateEmbeddedPropertyDocBlock(array $embeddedClass)
1765 1765
     {
1766 1766
         $lines = [];
1767
-        $lines[] = $this->spaces . '/**';
1768
-        $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\');
1767
+        $lines[] = $this->spaces.'/**';
1768
+        $lines[] = $this->spaces.' * @var \\'.ltrim($embeddedClass['class'], '\\');
1769 1769
 
1770 1770
         if ($this->generateAnnotations) {
1771
-            $lines[] = $this->spaces . ' *';
1771
+            $lines[] = $this->spaces.' *';
1772 1772
 
1773
-            $embedded = ['class="' . $embeddedClass['class'] . '"'];
1773
+            $embedded = ['class="'.$embeddedClass['class'].'"'];
1774 1774
 
1775 1775
             if (isset($embeddedClass['columnPrefix'])) {
1776 1776
                 if (is_string($embeddedClass['columnPrefix'])) {
1777
-                    $embedded[] = 'columnPrefix="' . $embeddedClass['columnPrefix'] . '"';
1777
+                    $embedded[] = 'columnPrefix="'.$embeddedClass['columnPrefix'].'"';
1778 1778
                 } else {
1779
-                    $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true);
1779
+                    $embedded[] = 'columnPrefix='.var_export($embeddedClass['columnPrefix'], true);
1780 1780
                 }
1781 1781
             }
1782 1782
 
1783
-            $lines[] = $this->spaces . ' * @' .
1784
-                $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')';
1783
+            $lines[] = $this->spaces.' * @'.
1784
+                $this->annotationsPrefix.'Embedded('.implode(', ', $embedded).')';
1785 1785
         }
1786 1786
 
1787
-        $lines[] = $this->spaces . ' */';
1787
+        $lines[] = $this->spaces.' */';
1788 1788
 
1789 1789
         return implode("\n", $lines);
1790 1790
     }
@@ -1798,13 +1798,13 @@  discard block
 block discarded – undo
1798 1798
         $processedClasses = [];
1799 1799
         foreach ($metadata->entityListeners as $event => $eventListeners) {
1800 1800
             foreach ($eventListeners as $eventListener) {
1801
-                $processedClasses[] = '"' . $eventListener['class'] . '"';
1801
+                $processedClasses[] = '"'.$eventListener['class'].'"';
1802 1802
             }
1803 1803
         }
1804 1804
 
1805 1805
         return \sprintf(
1806 1806
             '%s%s({%s})',
1807
-            '@' . $this->annotationsPrefix,
1807
+            '@'.$this->annotationsPrefix,
1808 1808
             'EntityListeners',
1809 1809
             \implode(',', \array_unique($processedClasses))
1810 1810
         );
@@ -1822,7 +1822,7 @@  discard block
 block discarded – undo
1822 1822
 
1823 1823
         foreach ($lines as $key => $value) {
1824 1824
             if ( ! empty($value)) {
1825
-                $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key];
1825
+                $lines[$key] = str_repeat($this->spaces, $num).$lines[$key];
1826 1826
             }
1827 1827
         }
1828 1828
 
@@ -1904,9 +1904,9 @@  discard block
 block discarded – undo
1904 1904
 
1905 1905
         foreach ($options as $name => $option) {
1906 1906
             if (is_array($option)) {
1907
-                $optionsStr[] = '"' . $name . '"={' . $this->exportTableOptions($option) . '}';
1907
+                $optionsStr[] = '"'.$name.'"={'.$this->exportTableOptions($option).'}';
1908 1908
             } else {
1909
-                $optionsStr[] = '"' . $name . '"="' . (string) $option . '"';
1909
+                $optionsStr[] = '"'.$name.'"="'.(string) $option.'"';
1910 1910
             }
1911 1911
         }
1912 1912
 
Please login to merge, or discard this patch.