@@ -289,11 +289,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ); |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | if ($buildNestedJoins) { |
907 | 907 | $classTableInheritanceJoins = $this->_generateClassTableInheritanceJoins($class, $dqlAlias); |
908 | 908 | if ($classTableInheritanceJoins != '') { |
909 | - $sql = '(' . $sql . $classTableInheritanceJoins . ')'; |
|
909 | + $sql = '('.$sql.$classTableInheritanceJoins.')'; |
|
910 | 910 | } |
911 | 911 | } else { |
912 | 912 | $sql .= $this->_generateClassTableInheritanceJoins($class, $dqlAlias); |
@@ -946,7 +946,7 @@ discard block |
||
946 | 946 | // Ensure we got the owning side, since it has all mapping info |
947 | 947 | $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation; |
948 | 948 | |
949 | - if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
949 | + if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
950 | 950 | if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) { |
951 | 951 | throw QueryException::iterateWithFetchJoinNotAllowed($assoc); |
952 | 952 | } |
@@ -966,12 +966,12 @@ discard block |
||
966 | 966 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
967 | 967 | |
968 | 968 | if ($relation['isOwningSide']) { |
969 | - $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn; |
|
969 | + $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn; |
|
970 | 970 | |
971 | 971 | continue; |
972 | 972 | } |
973 | 973 | |
974 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn; |
|
974 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn; |
|
975 | 975 | } |
976 | 976 | |
977 | 977 | // Apply remaining inheritance restrictions |
@@ -989,7 +989,7 @@ discard block |
||
989 | 989 | } |
990 | 990 | |
991 | 991 | $targetTableJoin = [ |
992 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
992 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
993 | 993 | 'condition' => implode(' AND ', $conditions), |
994 | 994 | ]; |
995 | 995 | break; |
@@ -1009,10 +1009,10 @@ discard block |
||
1009 | 1009 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
1010 | 1010 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
1011 | 1011 | |
1012 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; |
|
1012 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; |
|
1013 | 1013 | } |
1014 | 1014 | |
1015 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1015 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1016 | 1016 | |
1017 | 1017 | // Join target table |
1018 | 1018 | $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1026,7 +1026,7 @@ discard block |
||
1026 | 1026 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
1027 | 1027 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
1028 | 1028 | |
1029 | - $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; |
|
1029 | + $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; |
|
1030 | 1030 | } |
1031 | 1031 | |
1032 | 1032 | // Apply remaining inheritance restrictions |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | } |
1045 | 1045 | |
1046 | 1046 | $targetTableJoin = [ |
1047 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1047 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1048 | 1048 | 'condition' => implode(' AND ', $conditions), |
1049 | 1049 | ]; |
1050 | 1050 | break; |
@@ -1054,22 +1054,22 @@ discard block |
||
1054 | 1054 | } |
1055 | 1055 | |
1056 | 1056 | // Handle WITH clause |
1057 | - $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1057 | + $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1058 | 1058 | |
1059 | 1059 | if ($targetClass->isInheritanceTypeJoined()) { |
1060 | 1060 | $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1061 | 1061 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1062 | 1062 | if ($withCondition) { |
1063 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1063 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1064 | 1064 | } else { |
1065 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1065 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1066 | 1066 | } |
1067 | 1067 | } else { |
1068 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1068 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1069 | 1069 | } |
1070 | 1070 | |
1071 | 1071 | if ($withCondition) { |
1072 | - $sql .= ' AND ' . $withCondition; |
|
1072 | + $sql .= ' AND '.$withCondition; |
|
1073 | 1073 | } |
1074 | 1074 | |
1075 | 1075 | // Apply the indexes |
@@ -1102,7 +1102,7 @@ discard block |
||
1102 | 1102 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1103 | 1103 | } |
1104 | 1104 | |
1105 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1105 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1106 | 1106 | } |
1107 | 1107 | |
1108 | 1108 | /** |
@@ -1119,10 +1119,10 @@ discard block |
||
1119 | 1119 | $this->orderedColumnsMap[$sql] = $type; |
1120 | 1120 | |
1121 | 1121 | if ($expr instanceof AST\Subselect) { |
1122 | - return '(' . $sql . ') ' . $type; |
|
1122 | + return '('.$sql.') '.$type; |
|
1123 | 1123 | } |
1124 | 1124 | |
1125 | - return $sql . ' ' . $type; |
|
1125 | + return $sql.' '.$type; |
|
1126 | 1126 | } |
1127 | 1127 | |
1128 | 1128 | /** |
@@ -1130,7 +1130,7 @@ discard block |
||
1130 | 1130 | */ |
1131 | 1131 | public function walkHavingClause($havingClause) |
1132 | 1132 | { |
1133 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1133 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1134 | 1134 | } |
1135 | 1135 | |
1136 | 1136 | /** |
@@ -1153,7 +1153,7 @@ discard block |
||
1153 | 1153 | $conditions = []; |
1154 | 1154 | |
1155 | 1155 | if ($join->conditionalExpression) { |
1156 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1156 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1157 | 1157 | } |
1158 | 1158 | |
1159 | 1159 | $isUnconditionalJoin = empty($conditions); |
@@ -1161,7 +1161,7 @@ discard block |
||
1161 | 1161 | ? ' AND ' |
1162 | 1162 | : ' ON '; |
1163 | 1163 | |
1164 | - $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, !$isUnconditionalJoin); |
|
1164 | + $sql .= $this->generateRangeVariableDeclarationSQL($joinDeclaration, ! $isUnconditionalJoin); |
|
1165 | 1165 | |
1166 | 1166 | // Apply remaining inheritance restrictions |
1167 | 1167 | $discrSql = $this->_generateDiscriminatorColumnConditionSQL([$dqlAlias]); |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | } |
1179 | 1179 | |
1180 | 1180 | if ($conditions) { |
1181 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1181 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1182 | 1182 | } |
1183 | 1183 | |
1184 | 1184 | break; |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1209 | 1209 | } |
1210 | 1210 | |
1211 | - $sql .= implode(', ', $scalarExpressions) . ')'; |
|
1211 | + $sql .= implode(', ', $scalarExpressions).')'; |
|
1212 | 1212 | |
1213 | 1213 | return $sql; |
1214 | 1214 | } |
@@ -1230,7 +1230,7 @@ discard block |
||
1230 | 1230 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1231 | 1231 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1232 | 1232 | |
1233 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1233 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1234 | 1234 | } |
1235 | 1235 | |
1236 | 1236 | /** |
@@ -1245,11 +1245,11 @@ discard block |
||
1245 | 1245 | $sql = 'CASE'; |
1246 | 1246 | |
1247 | 1247 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1248 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1249 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1248 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1249 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1250 | 1250 | } |
1251 | 1251 | |
1252 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1252 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1253 | 1253 | |
1254 | 1254 | return $sql; |
1255 | 1255 | } |
@@ -1263,14 +1263,14 @@ discard block |
||
1263 | 1263 | */ |
1264 | 1264 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1265 | 1265 | { |
1266 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1266 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1267 | 1267 | |
1268 | 1268 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1269 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1270 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1269 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1270 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1271 | 1271 | } |
1272 | 1272 | |
1273 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1273 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1274 | 1274 | |
1275 | 1275 | return $sql; |
1276 | 1276 | } |
@@ -1304,14 +1304,14 @@ discard block |
||
1304 | 1304 | $fieldMapping = $class->fieldMappings[$fieldName]; |
1305 | 1305 | $columnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
1306 | 1306 | $columnAlias = $this->getSQLColumnAlias($fieldMapping['columnName']); |
1307 | - $col = $sqlTableAlias . '.' . $columnName; |
|
1307 | + $col = $sqlTableAlias.'.'.$columnName; |
|
1308 | 1308 | |
1309 | 1309 | if (isset($fieldMapping['requireSQLConversion'])) { |
1310 | 1310 | $type = Type::getType($fieldMapping['type']); |
1311 | 1311 | $col = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform()); |
1312 | 1312 | } |
1313 | 1313 | |
1314 | - $sql .= $col . ' AS ' . $columnAlias; |
|
1314 | + $sql .= $col.' AS '.$columnAlias; |
|
1315 | 1315 | |
1316 | 1316 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1317 | 1317 | |
@@ -1336,7 +1336,7 @@ discard block |
||
1336 | 1336 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1337 | 1337 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1338 | 1338 | |
1339 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1339 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1340 | 1340 | |
1341 | 1341 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1342 | 1342 | |
@@ -1350,7 +1350,7 @@ discard block |
||
1350 | 1350 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1351 | 1351 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1352 | 1352 | |
1353 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1353 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1354 | 1354 | |
1355 | 1355 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1356 | 1356 | |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | break; |
1362 | 1362 | |
1363 | 1363 | case ($expr instanceof AST\NewObjectExpression): |
1364 | - $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable); |
|
1364 | + $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable); |
|
1365 | 1365 | break; |
1366 | 1366 | |
1367 | 1367 | default: |
@@ -1402,14 +1402,14 @@ discard block |
||
1402 | 1402 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); |
1403 | 1403 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
1404 | 1404 | |
1405 | - $col = $sqlTableAlias . '.' . $quotedColumnName; |
|
1405 | + $col = $sqlTableAlias.'.'.$quotedColumnName; |
|
1406 | 1406 | |
1407 | 1407 | if (isset($mapping['requireSQLConversion'])) { |
1408 | 1408 | $type = Type::getType($mapping['type']); |
1409 | 1409 | $col = $type->convertToPHPValueSQL($col, $this->platform); |
1410 | 1410 | } |
1411 | 1411 | |
1412 | - $sqlParts[] = $col . ' AS '. $columnAlias; |
|
1412 | + $sqlParts[] = $col.' AS '.$columnAlias; |
|
1413 | 1413 | |
1414 | 1414 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; |
1415 | 1415 | |
@@ -1426,21 +1426,21 @@ discard block |
||
1426 | 1426 | $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
1427 | 1427 | |
1428 | 1428 | foreach ($subClass->fieldMappings as $fieldName => $mapping) { |
1429 | - if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) { |
|
1429 | + if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) { |
|
1430 | 1430 | continue; |
1431 | 1431 | } |
1432 | 1432 | |
1433 | 1433 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); |
1434 | 1434 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $this->platform); |
1435 | 1435 | |
1436 | - $col = $sqlTableAlias . '.' . $quotedColumnName; |
|
1436 | + $col = $sqlTableAlias.'.'.$quotedColumnName; |
|
1437 | 1437 | |
1438 | 1438 | if (isset($mapping['requireSQLConversion'])) { |
1439 | 1439 | $type = Type::getType($mapping['type']); |
1440 | 1440 | $col = $type->convertToPHPValueSQL($col, $this->platform); |
1441 | 1441 | } |
1442 | 1442 | |
1443 | - $sqlParts[] = $col . ' AS ' . $columnAlias; |
|
1443 | + $sqlParts[] = $col.' AS '.$columnAlias; |
|
1444 | 1444 | |
1445 | 1445 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; |
1446 | 1446 | |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | */ |
1461 | 1461 | public function walkQuantifiedExpression($qExpr) |
1462 | 1462 | { |
1463 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1463 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1464 | 1464 | } |
1465 | 1465 | |
1466 | 1466 | /** |
@@ -1500,7 +1500,7 @@ discard block |
||
1500 | 1500 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1501 | 1501 | } |
1502 | 1502 | |
1503 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1503 | + return ' FROM '.implode(', ', $sqlParts); |
|
1504 | 1504 | } |
1505 | 1505 | |
1506 | 1506 | /** |
@@ -1508,7 +1508,7 @@ discard block |
||
1508 | 1508 | */ |
1509 | 1509 | public function walkSimpleSelectClause($simpleSelectClause) |
1510 | 1510 | { |
1511 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1511 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1512 | 1512 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1513 | 1513 | } |
1514 | 1514 | |
@@ -1527,10 +1527,10 @@ discard block |
||
1527 | 1527 | * @param null|string $newObjectResultAlias |
1528 | 1528 | * @return string The SQL. |
1529 | 1529 | */ |
1530 | - public function walkNewObject($newObjectExpression, $newObjectResultAlias=null) |
|
1530 | + public function walkNewObject($newObjectExpression, $newObjectResultAlias = null) |
|
1531 | 1531 | { |
1532 | 1532 | $sqlSelectExpressions = []; |
1533 | - $objIndex = $newObjectResultAlias?:$this->newObjectCounter++; |
|
1533 | + $objIndex = $newObjectResultAlias ?: $this->newObjectCounter++; |
|
1534 | 1534 | |
1535 | 1535 | foreach ($newObjectExpression->args as $argIndex => $e) { |
1536 | 1536 | $resultAlias = $this->scalarResultCounter++; |
@@ -1543,7 +1543,7 @@ discard block |
||
1543 | 1543 | break; |
1544 | 1544 | |
1545 | 1545 | case ($e instanceof AST\Subselect): |
1546 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1546 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1547 | 1547 | break; |
1548 | 1548 | |
1549 | 1549 | case ($e instanceof AST\PathExpression): |
@@ -1552,7 +1552,7 @@ discard block |
||
1552 | 1552 | $class = $qComp['metadata']; |
1553 | 1553 | $fieldType = $class->fieldMappings[$e->field]['type']; |
1554 | 1554 | |
1555 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1555 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1556 | 1556 | break; |
1557 | 1557 | |
1558 | 1558 | case ($e instanceof AST\Literal): |
@@ -1566,11 +1566,11 @@ discard block |
||
1566 | 1566 | break; |
1567 | 1567 | } |
1568 | 1568 | |
1569 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1569 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1570 | 1570 | break; |
1571 | 1571 | |
1572 | 1572 | default: |
1573 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1573 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1574 | 1574 | break; |
1575 | 1575 | } |
1576 | 1576 | |
@@ -1603,10 +1603,10 @@ discard block |
||
1603 | 1603 | case ($expr instanceof AST\Subselect): |
1604 | 1604 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1605 | 1605 | |
1606 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1606 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1607 | 1607 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1608 | 1608 | |
1609 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1609 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1610 | 1610 | break; |
1611 | 1611 | |
1612 | 1612 | case ($expr instanceof AST\Functions\FunctionNode): |
@@ -1623,7 +1623,7 @@ discard block |
||
1623 | 1623 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1624 | 1624 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1625 | 1625 | |
1626 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1626 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1627 | 1627 | break; |
1628 | 1628 | |
1629 | 1629 | case ($expr instanceof AST\ParenthesisExpression): |
@@ -1643,8 +1643,8 @@ discard block |
||
1643 | 1643 | */ |
1644 | 1644 | public function walkAggregateExpression($aggExpression) |
1645 | 1645 | { |
1646 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1647 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1646 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1647 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1648 | 1648 | } |
1649 | 1649 | |
1650 | 1650 | /** |
@@ -1658,7 +1658,7 @@ discard block |
||
1658 | 1658 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1659 | 1659 | } |
1660 | 1660 | |
1661 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1661 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1662 | 1662 | } |
1663 | 1663 | |
1664 | 1664 | /** |
@@ -1715,7 +1715,7 @@ discard block |
||
1715 | 1715 | { |
1716 | 1716 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1717 | 1717 | $tableName = $class->getTableName(); |
1718 | - $sql = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform); |
|
1718 | + $sql = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform); |
|
1719 | 1719 | |
1720 | 1720 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1721 | 1721 | $this->rootAliases[] = $deleteClause->aliasIdentificationVariable; |
@@ -1730,12 +1730,12 @@ discard block |
||
1730 | 1730 | { |
1731 | 1731 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1732 | 1732 | $tableName = $class->getTableName(); |
1733 | - $sql = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform); |
|
1733 | + $sql = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform); |
|
1734 | 1734 | |
1735 | 1735 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1736 | 1736 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1737 | 1737 | |
1738 | - $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1738 | + $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1739 | 1739 | |
1740 | 1740 | return $sql; |
1741 | 1741 | } |
@@ -1748,7 +1748,7 @@ discard block |
||
1748 | 1748 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1749 | 1749 | $this->useSqlTableAliases = false; |
1750 | 1750 | |
1751 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1751 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1752 | 1752 | $newValue = $updateItem->newValue; |
1753 | 1753 | |
1754 | 1754 | switch (true) { |
@@ -1791,7 +1791,7 @@ discard block |
||
1791 | 1791 | |
1792 | 1792 | if (count($filterClauses)) { |
1793 | 1793 | if ($condSql) { |
1794 | - $condSql = '(' . $condSql . ') AND '; |
|
1794 | + $condSql = '('.$condSql.') AND '; |
|
1795 | 1795 | } |
1796 | 1796 | |
1797 | 1797 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1799,11 +1799,11 @@ discard block |
||
1799 | 1799 | } |
1800 | 1800 | |
1801 | 1801 | if ($condSql) { |
1802 | - return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1802 | + return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1803 | 1803 | } |
1804 | 1804 | |
1805 | 1805 | if ($discrSql) { |
1806 | - return ' WHERE ' . $discrSql; |
|
1806 | + return ' WHERE '.$discrSql; |
|
1807 | 1807 | } |
1808 | 1808 | |
1809 | 1809 | return ''; |
@@ -1846,7 +1846,7 @@ discard block |
||
1846 | 1846 | // if only one ConditionalPrimary is defined |
1847 | 1847 | return ( ! ($factor instanceof AST\ConditionalFactor)) |
1848 | 1848 | ? $this->walkConditionalPrimary($factor) |
1849 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1849 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1850 | 1850 | } |
1851 | 1851 | |
1852 | 1852 | /** |
@@ -1861,7 +1861,7 @@ discard block |
||
1861 | 1861 | if ($primary->isConditionalExpression()) { |
1862 | 1862 | $condExpr = $primary->conditionalExpression; |
1863 | 1863 | |
1864 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1864 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1865 | 1865 | } |
1866 | 1866 | } |
1867 | 1867 | |
@@ -1872,7 +1872,7 @@ discard block |
||
1872 | 1872 | { |
1873 | 1873 | $sql = ($existsExpr->not) ? 'NOT ' : ''; |
1874 | 1874 | |
1875 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1875 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1876 | 1876 | |
1877 | 1877 | return $sql; |
1878 | 1878 | } |
@@ -1916,7 +1916,7 @@ discard block |
||
1916 | 1916 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1917 | 1917 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1918 | 1918 | |
1919 | - $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE '; |
|
1919 | + $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE '; |
|
1920 | 1920 | |
1921 | 1921 | $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; |
1922 | 1922 | $sqlParts = []; |
@@ -1924,7 +1924,7 @@ discard block |
||
1924 | 1924 | foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { |
1925 | 1925 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform); |
1926 | 1926 | |
1927 | - $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn; |
|
1927 | + $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn; |
|
1928 | 1928 | } |
1929 | 1929 | |
1930 | 1930 | foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { |
@@ -1932,7 +1932,7 @@ discard block |
||
1932 | 1932 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
1933 | 1933 | } |
1934 | 1934 | |
1935 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' = ' . $entitySql; |
|
1935 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql; |
|
1936 | 1936 | } |
1937 | 1937 | |
1938 | 1938 | $sql .= implode(' AND ', $sqlParts); |
@@ -1948,8 +1948,8 @@ discard block |
||
1948 | 1948 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1949 | 1949 | |
1950 | 1950 | // join to target table |
1951 | - $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias |
|
1952 | - . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON '; |
|
1951 | + $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias |
|
1952 | + . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON '; |
|
1953 | 1953 | |
1954 | 1954 | // join conditions |
1955 | 1955 | $joinColumns = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns']; |
@@ -1958,7 +1958,7 @@ discard block |
||
1958 | 1958 | foreach ($joinColumns as $joinColumn) { |
1959 | 1959 | $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform); |
1960 | 1960 | |
1961 | - $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn; |
|
1961 | + $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn; |
|
1962 | 1962 | } |
1963 | 1963 | |
1964 | 1964 | $sql .= implode(' AND ', $joinSqlParts); |
@@ -1970,7 +1970,7 @@ discard block |
||
1970 | 1970 | foreach ($joinColumns as $joinColumn) { |
1971 | 1971 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform); |
1972 | 1972 | |
1973 | - $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn; |
|
1973 | + $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn; |
|
1974 | 1974 | } |
1975 | 1975 | |
1976 | 1976 | foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { |
@@ -1978,13 +1978,13 @@ discard block |
||
1978 | 1978 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
1979 | 1979 | } |
1980 | 1980 | |
1981 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')'; |
|
1981 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')'; |
|
1982 | 1982 | } |
1983 | 1983 | |
1984 | 1984 | $sql .= implode(' AND ', $sqlParts); |
1985 | 1985 | } |
1986 | 1986 | |
1987 | - return $sql . ')'; |
|
1987 | + return $sql.')'; |
|
1988 | 1988 | } |
1989 | 1989 | |
1990 | 1990 | /** |
@@ -1995,7 +1995,7 @@ discard block |
||
1995 | 1995 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
1996 | 1996 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
1997 | 1997 | |
1998 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
1998 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
1999 | 1999 | } |
2000 | 2000 | |
2001 | 2001 | /** |
@@ -2004,19 +2004,19 @@ discard block |
||
2004 | 2004 | public function walkNullComparisonExpression($nullCompExpr) |
2005 | 2005 | { |
2006 | 2006 | $expression = $nullCompExpr->expression; |
2007 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2007 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2008 | 2008 | |
2009 | 2009 | // Handle ResultVariable |
2010 | 2010 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2011 | - return $this->walkResultVariable($expression) . $comparison; |
|
2011 | + return $this->walkResultVariable($expression).$comparison; |
|
2012 | 2012 | } |
2013 | 2013 | |
2014 | 2014 | // Handle InputParameter mapping inclusion to ParserResult |
2015 | 2015 | if ($expression instanceof AST\InputParameter) { |
2016 | - return $this->walkInputParameter($expression) . $comparison; |
|
2016 | + return $this->walkInputParameter($expression).$comparison; |
|
2017 | 2017 | } |
2018 | 2018 | |
2019 | - return $expression->dispatch($this) . $comparison; |
|
2019 | + return $expression->dispatch($this).$comparison; |
|
2020 | 2020 | } |
2021 | 2021 | |
2022 | 2022 | /** |
@@ -2024,7 +2024,7 @@ discard block |
||
2024 | 2024 | */ |
2025 | 2025 | public function walkInExpression($inExpr) |
2026 | 2026 | { |
2027 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2027 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2028 | 2028 | |
2029 | 2029 | $sql .= ($inExpr->subselect) |
2030 | 2030 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2051,10 +2051,10 @@ discard block |
||
2051 | 2051 | } |
2052 | 2052 | |
2053 | 2053 | if ($this->useSqlTableAliases) { |
2054 | - $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.'; |
|
2054 | + $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.'; |
|
2055 | 2055 | } |
2056 | 2056 | |
2057 | - $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN '); |
|
2057 | + $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN '); |
|
2058 | 2058 | $sql .= $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr); |
2059 | 2059 | |
2060 | 2060 | return $sql; |
@@ -2101,8 +2101,8 @@ discard block |
||
2101 | 2101 | $sql .= ' NOT'; |
2102 | 2102 | } |
2103 | 2103 | |
2104 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2105 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2104 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2105 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2106 | 2106 | |
2107 | 2107 | return $sql; |
2108 | 2108 | } |
@@ -2117,7 +2117,7 @@ discard block |
||
2117 | 2117 | ? $this->walkResultVariable($stringExpr) |
2118 | 2118 | : $stringExpr->dispatch($this); |
2119 | 2119 | |
2120 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2120 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2121 | 2121 | |
2122 | 2122 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2123 | 2123 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2130,7 +2130,7 @@ discard block |
||
2130 | 2130 | } |
2131 | 2131 | |
2132 | 2132 | if ($likeExpr->escapeChar) { |
2133 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2133 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2134 | 2134 | } |
2135 | 2135 | |
2136 | 2136 | return $sql; |
@@ -2157,7 +2157,7 @@ discard block |
||
2157 | 2157 | ? $leftExpr->dispatch($this) |
2158 | 2158 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2159 | 2159 | |
2160 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2160 | + $sql .= ' '.$compExpr->operator.' '; |
|
2161 | 2161 | |
2162 | 2162 | $sql .= ($rightExpr instanceof AST\Node) |
2163 | 2163 | ? $rightExpr->dispatch($this) |
@@ -2189,7 +2189,7 @@ discard block |
||
2189 | 2189 | { |
2190 | 2190 | return ($arithmeticExpr->isSimpleArithmeticExpression()) |
2191 | 2191 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2192 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2192 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2193 | 2193 | } |
2194 | 2194 | |
2195 | 2195 | /** |
@@ -2243,7 +2243,7 @@ discard block |
||
2243 | 2243 | |
2244 | 2244 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2245 | 2245 | |
2246 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2246 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2247 | 2247 | } |
2248 | 2248 | |
2249 | 2249 | /** |
@@ -2256,7 +2256,7 @@ discard block |
||
2256 | 2256 | public function walkArithmeticPrimary($primary) |
2257 | 2257 | { |
2258 | 2258 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2259 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2259 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2260 | 2260 | } |
2261 | 2261 | |
2262 | 2262 | if ($primary instanceof AST\Node) { |
@@ -2320,6 +2320,6 @@ discard block |
||
2320 | 2320 | $sqlParameterList[] = $this->conn->quote($dis); |
2321 | 2321 | } |
2322 | 2322 | |
2323 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2323 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2324 | 2324 | } |
2325 | 2325 | } |