@@ -288,11 +288,11 @@ discard block |
||
288 | 288 | */ |
289 | 289 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
290 | 290 | { |
291 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
291 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
292 | 292 | |
293 | 293 | if ( ! isset($this->tableAliasMap[$tableName])) { |
294 | 294 | $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't') |
295 | - . $this->tableAliasCounter++ . '_'; |
|
295 | + . $this->tableAliasCounter++.'_'; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | return $this->tableAliasMap[$tableName]; |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
312 | 312 | { |
313 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
313 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
314 | 314 | |
315 | 315 | $this->tableAliasMap[$tableName] = $alias; |
316 | 316 | |
@@ -351,12 +351,12 @@ discard block |
||
351 | 351 | |
352 | 352 | // If this is a joined association we must use left joins to preserve the correct result. |
353 | 353 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
354 | - $sql .= 'JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
354 | + $sql .= 'JOIN '.$this->quoteStrategy->getTableName($parentClass, $this->platform).' '.$tableAlias.' ON '; |
|
355 | 355 | |
356 | 356 | $sqlParts = []; |
357 | 357 | |
358 | 358 | foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { |
359 | - $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; |
|
359 | + $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName; |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | // Add filters on the root class |
@@ -377,12 +377,12 @@ discard block |
||
377 | 377 | $subClass = $this->em->getClassMetadata($subClassName); |
378 | 378 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
379 | 379 | |
380 | - $sql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
380 | + $sql .= ' LEFT JOIN '.$this->quoteStrategy->getTableName($subClass, $this->platform).' '.$tableAlias.' ON '; |
|
381 | 381 | |
382 | 382 | $sqlParts = []; |
383 | 383 | |
384 | 384 | foreach ($this->quoteStrategy->getIdentifierColumnNames($subClass, $this->platform) as $columnName) { |
385 | - $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName; |
|
385 | + $sqlParts[] = $baseTableAlias.'.'.$columnName.' = '.$tableAlias.'.'.$columnName; |
|
386 | 386 | } |
387 | 387 | |
388 | 388 | $sql .= implode(' AND ', $sqlParts); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | ? $persister->getOwningTable($fieldName) |
415 | 415 | : $qComp['metadata']->getTableName(); |
416 | 416 | |
417 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
417 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
418 | 418 | |
419 | 419 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
420 | 420 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | } |
423 | 423 | |
424 | 424 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
425 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
425 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
426 | 426 | } |
427 | 427 | } |
428 | 428 | |
@@ -457,15 +457,15 @@ discard block |
||
457 | 457 | } |
458 | 458 | |
459 | 459 | $sqlTableAlias = ($this->useSqlTableAliases) |
460 | - ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.' |
|
460 | + ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.' |
|
461 | 461 | : ''; |
462 | 462 | |
463 | - $sqlParts[] = $sqlTableAlias . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')'; |
|
463 | + $sqlParts[] = $sqlTableAlias.$class->discriminatorColumn['name'].' IN ('.implode(', ', $values).')'; |
|
464 | 464 | } |
465 | 465 | |
466 | 466 | $sql = implode(' AND ', $sqlParts); |
467 | 467 | |
468 | - return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql; |
|
468 | + return (count($sqlParts) > 1) ? '('.$sql.')' : $sql; |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | /** |
@@ -478,11 +478,11 @@ discard block |
||
478 | 478 | */ |
479 | 479 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
480 | 480 | { |
481 | - if (!$this->em->hasFilters()) { |
|
481 | + if ( ! $this->em->hasFilters()) { |
|
482 | 482 | return ''; |
483 | 483 | } |
484 | 484 | |
485 | - switch($targetEntity->inheritanceType) { |
|
485 | + switch ($targetEntity->inheritanceType) { |
|
486 | 486 | case ClassMetadata::INHERITANCE_TYPE_NONE: |
487 | 487 | break; |
488 | 488 | case ClassMetadata::INHERITANCE_TYPE_JOINED: |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | $filterClauses = []; |
506 | 506 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
507 | 507 | if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
508 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
508 | + $filterClauses[] = '('.$filterExpr.')'; |
|
509 | 509 | } |
510 | 510 | } |
511 | 511 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | } |
538 | 538 | |
539 | 539 | if ( ! $AST->orderByClause && ($orderBySql = $this->_generateOrderedCollectionOrderByItems())) { |
540 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
540 | + $sql .= ' ORDER BY '.$orderBySql; |
|
541 | 541 | } |
542 | 542 | |
543 | 543 | if ($limit !== null || $offset !== null) { |
@@ -549,11 +549,11 @@ discard block |
||
549 | 549 | } |
550 | 550 | |
551 | 551 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
552 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
552 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
553 | 553 | } |
554 | 554 | |
555 | 555 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
556 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
556 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
557 | 557 | } |
558 | 558 | |
559 | 559 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | $sqlParts = []; |
609 | 609 | |
610 | 610 | foreach ($this->quoteStrategy->getIdentifierColumnNames($class, $this->platform) as $columnName) { |
611 | - $sqlParts[] = $tableAlias . '.' . $columnName; |
|
611 | + $sqlParts[] = $tableAlias.'.'.$columnName; |
|
612 | 612 | } |
613 | 613 | |
614 | 614 | return implode(', ', $sqlParts); |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
651 | 651 | |
652 | 652 | if ($this->useSqlTableAliases) { |
653 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
653 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
654 | 654 | } |
655 | 655 | |
656 | 656 | $sql .= $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | } |
680 | 680 | |
681 | 681 | if ($this->useSqlTableAliases) { |
682 | - $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.'; |
|
682 | + $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias).'.'; |
|
683 | 683 | } |
684 | 684 | |
685 | 685 | $sql .= reset($assoc['targetToSourceKeyColumns']); |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | */ |
698 | 698 | public function walkSelectClause($selectClause) |
699 | 699 | { |
700 | - $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
700 | + $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
701 | 701 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
702 | 702 | |
703 | 703 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) { |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | $discrColumn = $rootClass->discriminatorColumn; |
735 | 735 | $columnAlias = $this->getSQLColumnAlias($discrColumn['name']); |
736 | 736 | |
737 | - $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias; |
|
737 | + $sqlSelectExpressions[] = $tblAlias.'.'.$discrColumn['name'].' AS '.$columnAlias; |
|
738 | 738 | |
739 | 739 | $this->rsm->setDiscriminatorColumn($dqlAlias, $columnAlias); |
740 | 740 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName'], false, $discrColumn['type']); |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | foreach ($class->associationMappings as $assoc) { |
750 | 750 | if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) { |
751 | 751 | continue; |
752 | - } else if ( !$addMetaColumns && !isset($assoc['id'])) { |
|
752 | + } else if ( ! $addMetaColumns && ! isset($assoc['id'])) { |
|
753 | 753 | continue; |
754 | 754 | } |
755 | 755 | |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | $columnType = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); |
765 | 765 | |
766 | 766 | $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
767 | - $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; |
|
767 | + $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; |
|
768 | 768 | |
769 | 769 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType); |
770 | 770 | } |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | $columnType = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em); |
794 | 794 | |
795 | 795 | $quotedColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $subClass, $this->platform); |
796 | - $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; |
|
796 | + $sqlSelectExpressions[] = $sqlTableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; |
|
797 | 797 | |
798 | 798 | $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType); |
799 | 799 | } |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
820 | 820 | } |
821 | 821 | |
822 | - return ' FROM ' . implode(', ', $sqlParts); |
|
822 | + return ' FROM '.implode(', ', $sqlParts); |
|
823 | 823 | } |
824 | 824 | |
825 | 825 | /** |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | } |
884 | 884 | |
885 | 885 | $sql = $this->platform->appendLockHint( |
886 | - $this->quoteStrategy->getTableName($class, $this->platform) . ' ' . |
|
886 | + $this->quoteStrategy->getTableName($class, $this->platform).' '. |
|
887 | 887 | $this->getSQLTableAlias($class->getTableName(), $dqlAlias), |
888 | 888 | $this->query->getHint(Query::HINT_LOCK_MODE) |
889 | 889 | ); |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | // Ensure we got the owning side, since it has all mapping info |
926 | 926 | $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation; |
927 | 927 | |
928 | - if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
928 | + if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) == true && ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
929 | 929 | if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) { |
930 | 930 | throw QueryException::iterateWithFetchJoinNotAllowed($assoc); |
931 | 931 | } |
@@ -945,12 +945,12 @@ discard block |
||
945 | 945 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
946 | 946 | |
947 | 947 | if ($relation['isOwningSide']) { |
948 | - $conditions[] = $sourceTableAlias . '.' . $quotedSourceColumn . ' = ' . $targetTableAlias . '.' . $quotedTargetColumn; |
|
948 | + $conditions[] = $sourceTableAlias.'.'.$quotedSourceColumn.' = '.$targetTableAlias.'.'.$quotedTargetColumn; |
|
949 | 949 | |
950 | 950 | continue; |
951 | 951 | } |
952 | 952 | |
953 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $quotedSourceColumn; |
|
953 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$targetTableAlias.'.'.$quotedSourceColumn; |
|
954 | 954 | } |
955 | 955 | |
956 | 956 | // Apply remaining inheritance restrictions |
@@ -968,7 +968,7 @@ discard block |
||
968 | 968 | } |
969 | 969 | |
970 | 970 | $targetTableJoin = [ |
971 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
971 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
972 | 972 | 'condition' => implode(' AND ', $conditions), |
973 | 973 | ]; |
974 | 974 | break; |
@@ -988,10 +988,10 @@ discard block |
||
988 | 988 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
989 | 989 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
990 | 990 | |
991 | - $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; |
|
991 | + $conditions[] = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; |
|
992 | 992 | } |
993 | 993 | |
994 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
994 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
995 | 995 | |
996 | 996 | // Join target table |
997 | 997 | $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
1006 | 1006 | $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
1007 | 1007 | |
1008 | - $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn; |
|
1008 | + $conditions[] = $targetTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableAlias.'.'.$quotedSourceColumn; |
|
1009 | 1009 | } |
1010 | 1010 | |
1011 | 1011 | // Apply remaining inheritance restrictions |
@@ -1023,7 +1023,7 @@ discard block |
||
1023 | 1023 | } |
1024 | 1024 | |
1025 | 1025 | $targetTableJoin = [ |
1026 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1026 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1027 | 1027 | 'condition' => implode(' AND ', $conditions), |
1028 | 1028 | ]; |
1029 | 1029 | break; |
@@ -1033,22 +1033,22 @@ discard block |
||
1033 | 1033 | } |
1034 | 1034 | |
1035 | 1035 | // Handle WITH clause |
1036 | - $withCondition = (null === $condExpr) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1036 | + $withCondition = (null === $condExpr) ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1037 | 1037 | |
1038 | 1038 | if ($targetClass->isInheritanceTypeJoined()) { |
1039 | 1039 | $ctiJoins = $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1040 | 1040 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1041 | 1041 | if ($withCondition) { |
1042 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1042 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1043 | 1043 | } else { |
1044 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1044 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1045 | 1045 | } |
1046 | 1046 | } else { |
1047 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1047 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1048 | 1048 | } |
1049 | 1049 | |
1050 | 1050 | if ($withCondition) { |
1051 | - $sql .= ' AND ' . $withCondition; |
|
1051 | + $sql .= ' AND '.$withCondition; |
|
1052 | 1052 | } |
1053 | 1053 | |
1054 | 1054 | // Apply the indexes |
@@ -1081,7 +1081,7 @@ discard block |
||
1081 | 1081 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1082 | 1082 | } |
1083 | 1083 | |
1084 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1084 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1085 | 1085 | } |
1086 | 1086 | |
1087 | 1087 | /** |
@@ -1098,10 +1098,10 @@ discard block |
||
1098 | 1098 | $this->orderedColumnsMap[$sql] = $type; |
1099 | 1099 | |
1100 | 1100 | if ($expr instanceof AST\Subselect) { |
1101 | - return '(' . $sql . ') ' . $type; |
|
1101 | + return '('.$sql.') '.$type; |
|
1102 | 1102 | } |
1103 | 1103 | |
1104 | - return $sql . ' ' . $type; |
|
1104 | + return $sql.' '.$type; |
|
1105 | 1105 | } |
1106 | 1106 | |
1107 | 1107 | /** |
@@ -1109,7 +1109,7 @@ discard block |
||
1109 | 1109 | */ |
1110 | 1110 | public function walkHavingClause($havingClause) |
1111 | 1111 | { |
1112 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1112 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1113 | 1113 | } |
1114 | 1114 | |
1115 | 1115 | /** |
@@ -1132,7 +1132,7 @@ discard block |
||
1132 | 1132 | $conditions = []; |
1133 | 1133 | |
1134 | 1134 | if ($join->conditionalExpression) { |
1135 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1135 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1136 | 1136 | } |
1137 | 1137 | |
1138 | 1138 | $condExprConjunction = ($class->isInheritanceTypeJoined() && $joinType != AST\Join::JOIN_TYPE_LEFT && $joinType != AST\Join::JOIN_TYPE_LEFTOUTER) |
@@ -1156,7 +1156,7 @@ discard block |
||
1156 | 1156 | } |
1157 | 1157 | |
1158 | 1158 | if ($conditions) { |
1159 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1159 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1160 | 1160 | } |
1161 | 1161 | |
1162 | 1162 | break; |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1187 | 1187 | } |
1188 | 1188 | |
1189 | - $sql .= implode(', ', $scalarExpressions) . ')'; |
|
1189 | + $sql .= implode(', ', $scalarExpressions).')'; |
|
1190 | 1190 | |
1191 | 1191 | return $sql; |
1192 | 1192 | } |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1209 | 1209 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1210 | 1210 | |
1211 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1211 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1212 | 1212 | } |
1213 | 1213 | |
1214 | 1214 | /** |
@@ -1223,11 +1223,11 @@ discard block |
||
1223 | 1223 | $sql = 'CASE'; |
1224 | 1224 | |
1225 | 1225 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1226 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1227 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1226 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1227 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1228 | 1228 | } |
1229 | 1229 | |
1230 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1230 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1231 | 1231 | |
1232 | 1232 | return $sql; |
1233 | 1233 | } |
@@ -1241,14 +1241,14 @@ discard block |
||
1241 | 1241 | */ |
1242 | 1242 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1243 | 1243 | { |
1244 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1244 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1245 | 1245 | |
1246 | 1246 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1247 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1248 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1247 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1248 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1249 | 1249 | } |
1250 | 1250 | |
1251 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1251 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1252 | 1252 | |
1253 | 1253 | return $sql; |
1254 | 1254 | } |
@@ -1282,14 +1282,14 @@ discard block |
||
1282 | 1282 | $fieldMapping = $class->fieldMappings[$fieldName]; |
1283 | 1283 | $columnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
1284 | 1284 | $columnAlias = $this->getSQLColumnAlias($fieldMapping['columnName']); |
1285 | - $col = $sqlTableAlias . '.' . $columnName; |
|
1285 | + $col = $sqlTableAlias.'.'.$columnName; |
|
1286 | 1286 | |
1287 | 1287 | if (isset($fieldMapping['requireSQLConversion'])) { |
1288 | 1288 | $type = Type::getType($fieldMapping['type']); |
1289 | 1289 | $col = $type->convertToPHPValueSQL($col, $this->conn->getDatabasePlatform()); |
1290 | 1290 | } |
1291 | 1291 | |
1292 | - $sql .= $col . ' AS ' . $columnAlias; |
|
1292 | + $sql .= $col.' AS '.$columnAlias; |
|
1293 | 1293 | |
1294 | 1294 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1295 | 1295 | |
@@ -1314,7 +1314,7 @@ discard block |
||
1314 | 1314 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1315 | 1315 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1316 | 1316 | |
1317 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1317 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1318 | 1318 | |
1319 | 1319 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1320 | 1320 | |
@@ -1328,7 +1328,7 @@ discard block |
||
1328 | 1328 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1329 | 1329 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1330 | 1330 | |
1331 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1331 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1332 | 1332 | |
1333 | 1333 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1334 | 1334 | |
@@ -1339,7 +1339,7 @@ discard block |
||
1339 | 1339 | break; |
1340 | 1340 | |
1341 | 1341 | case ($expr instanceof AST\NewObjectExpression): |
1342 | - $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable); |
|
1342 | + $sql .= $this->walkNewObject($expr, $selectExpression->fieldIdentificationVariable); |
|
1343 | 1343 | break; |
1344 | 1344 | |
1345 | 1345 | default: |
@@ -1380,14 +1380,14 @@ discard block |
||
1380 | 1380 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); |
1381 | 1381 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $class, $this->platform); |
1382 | 1382 | |
1383 | - $col = $sqlTableAlias . '.' . $quotedColumnName; |
|
1383 | + $col = $sqlTableAlias.'.'.$quotedColumnName; |
|
1384 | 1384 | |
1385 | 1385 | if (isset($mapping['requireSQLConversion'])) { |
1386 | 1386 | $type = Type::getType($mapping['type']); |
1387 | 1387 | $col = $type->convertToPHPValueSQL($col, $this->platform); |
1388 | 1388 | } |
1389 | 1389 | |
1390 | - $sqlParts[] = $col . ' AS '. $columnAlias; |
|
1390 | + $sqlParts[] = $col.' AS '.$columnAlias; |
|
1391 | 1391 | |
1392 | 1392 | $this->scalarResultAliasMap[$resultAlias][] = $columnAlias; |
1393 | 1393 | |
@@ -1404,21 +1404,21 @@ discard block |
||
1404 | 1404 | $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
1405 | 1405 | |
1406 | 1406 | foreach ($subClass->fieldMappings as $fieldName => $mapping) { |
1407 | - if (isset($mapping['inherited']) || ($partialFieldSet && !in_array($fieldName, $partialFieldSet))) { |
|
1407 | + if (isset($mapping['inherited']) || ($partialFieldSet && ! in_array($fieldName, $partialFieldSet))) { |
|
1408 | 1408 | continue; |
1409 | 1409 | } |
1410 | 1410 | |
1411 | 1411 | $columnAlias = $this->getSQLColumnAlias($mapping['columnName']); |
1412 | 1412 | $quotedColumnName = $this->quoteStrategy->getColumnName($fieldName, $subClass, $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 | |
@@ -1438,7 +1438,7 @@ discard block |
||
1438 | 1438 | */ |
1439 | 1439 | public function walkQuantifiedExpression($qExpr) |
1440 | 1440 | { |
1441 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1441 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1442 | 1442 | } |
1443 | 1443 | |
1444 | 1444 | /** |
@@ -1478,7 +1478,7 @@ discard block |
||
1478 | 1478 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1479 | 1479 | } |
1480 | 1480 | |
1481 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1481 | + return ' FROM '.implode(', ', $sqlParts); |
|
1482 | 1482 | } |
1483 | 1483 | |
1484 | 1484 | /** |
@@ -1486,7 +1486,7 @@ discard block |
||
1486 | 1486 | */ |
1487 | 1487 | public function walkSimpleSelectClause($simpleSelectClause) |
1488 | 1488 | { |
1489 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1489 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1490 | 1490 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1491 | 1491 | } |
1492 | 1492 | |
@@ -1505,10 +1505,10 @@ discard block |
||
1505 | 1505 | * |
1506 | 1506 | * @return string The SQL. |
1507 | 1507 | */ |
1508 | - public function walkNewObject($newObjectExpression, $newObjectResultAlias=null) |
|
1508 | + public function walkNewObject($newObjectExpression, $newObjectResultAlias = null) |
|
1509 | 1509 | { |
1510 | 1510 | $sqlSelectExpressions = []; |
1511 | - $objIndex = $newObjectResultAlias?:$this->newObjectCounter++; |
|
1511 | + $objIndex = $newObjectResultAlias ?: $this->newObjectCounter++; |
|
1512 | 1512 | |
1513 | 1513 | foreach ($newObjectExpression->args as $argIndex => $e) { |
1514 | 1514 | $resultAlias = $this->scalarResultCounter++; |
@@ -1521,7 +1521,7 @@ discard block |
||
1521 | 1521 | break; |
1522 | 1522 | |
1523 | 1523 | case ($e instanceof AST\Subselect): |
1524 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1524 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1525 | 1525 | break; |
1526 | 1526 | |
1527 | 1527 | case ($e instanceof AST\PathExpression): |
@@ -1530,7 +1530,7 @@ discard block |
||
1530 | 1530 | $class = $qComp['metadata']; |
1531 | 1531 | $fieldType = $class->fieldMappings[$e->field]['type']; |
1532 | 1532 | |
1533 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1533 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1534 | 1534 | break; |
1535 | 1535 | |
1536 | 1536 | case ($e instanceof AST\Literal): |
@@ -1544,11 +1544,11 @@ discard block |
||
1544 | 1544 | break; |
1545 | 1545 | } |
1546 | 1546 | |
1547 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1547 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1548 | 1548 | break; |
1549 | 1549 | |
1550 | 1550 | default: |
1551 | - $sqlSelectExpressions[] = trim($e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1551 | + $sqlSelectExpressions[] = trim($e->dispatch($this)).' AS '.$columnAlias; |
|
1552 | 1552 | break; |
1553 | 1553 | } |
1554 | 1554 | |
@@ -1581,16 +1581,16 @@ discard block |
||
1581 | 1581 | case ($expr instanceof AST\AggregateExpression): |
1582 | 1582 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1583 | 1583 | |
1584 | - $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias; |
|
1584 | + $sql .= $this->walkAggregateExpression($expr).' AS dctrn__'.$alias; |
|
1585 | 1585 | break; |
1586 | 1586 | |
1587 | 1587 | case ($expr instanceof AST\Subselect): |
1588 | 1588 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1589 | 1589 | |
1590 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1590 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1591 | 1591 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1592 | 1592 | |
1593 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1593 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1594 | 1594 | break; |
1595 | 1595 | |
1596 | 1596 | case ($expr instanceof AST\Functions\FunctionNode): |
@@ -1607,7 +1607,7 @@ discard block |
||
1607 | 1607 | $columnAlias = $this->getSQLColumnAlias('sclr'); |
1608 | 1608 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1609 | 1609 | |
1610 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1610 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1611 | 1611 | break; |
1612 | 1612 | |
1613 | 1613 | case ($expr instanceof AST\ParenthesisExpression): |
@@ -1627,8 +1627,8 @@ discard block |
||
1627 | 1627 | */ |
1628 | 1628 | public function walkAggregateExpression($aggExpression) |
1629 | 1629 | { |
1630 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1631 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1630 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1631 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1632 | 1632 | } |
1633 | 1633 | |
1634 | 1634 | /** |
@@ -1642,7 +1642,7 @@ discard block |
||
1642 | 1642 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1643 | 1643 | } |
1644 | 1644 | |
1645 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1645 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1646 | 1646 | } |
1647 | 1647 | |
1648 | 1648 | /** |
@@ -1699,7 +1699,7 @@ discard block |
||
1699 | 1699 | { |
1700 | 1700 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1701 | 1701 | $tableName = $class->getTableName(); |
1702 | - $sql = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform); |
|
1702 | + $sql = 'DELETE FROM '.$this->quoteStrategy->getTableName($class, $this->platform); |
|
1703 | 1703 | |
1704 | 1704 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1705 | 1705 | $this->rootAliases[] = $deleteClause->aliasIdentificationVariable; |
@@ -1714,12 +1714,12 @@ discard block |
||
1714 | 1714 | { |
1715 | 1715 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1716 | 1716 | $tableName = $class->getTableName(); |
1717 | - $sql = 'UPDATE ' . $this->quoteStrategy->getTableName($class, $this->platform); |
|
1717 | + $sql = 'UPDATE '.$this->quoteStrategy->getTableName($class, $this->platform); |
|
1718 | 1718 | |
1719 | 1719 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1720 | 1720 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1721 | 1721 | |
1722 | - $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1722 | + $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1723 | 1723 | |
1724 | 1724 | return $sql; |
1725 | 1725 | } |
@@ -1732,7 +1732,7 @@ discard block |
||
1732 | 1732 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1733 | 1733 | $this->useSqlTableAliases = false; |
1734 | 1734 | |
1735 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1735 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1736 | 1736 | $newValue = $updateItem->newValue; |
1737 | 1737 | |
1738 | 1738 | switch (true) { |
@@ -1775,7 +1775,7 @@ discard block |
||
1775 | 1775 | |
1776 | 1776 | if (count($filterClauses)) { |
1777 | 1777 | if ($condSql) { |
1778 | - $condSql = '(' . $condSql . ') AND '; |
|
1778 | + $condSql = '('.$condSql.') AND '; |
|
1779 | 1779 | } |
1780 | 1780 | |
1781 | 1781 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1783,11 +1783,11 @@ discard block |
||
1783 | 1783 | } |
1784 | 1784 | |
1785 | 1785 | if ($condSql) { |
1786 | - return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1786 | + return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1787 | 1787 | } |
1788 | 1788 | |
1789 | 1789 | if ($discrSql) { |
1790 | - return ' WHERE ' . $discrSql; |
|
1790 | + return ' WHERE '.$discrSql; |
|
1791 | 1791 | } |
1792 | 1792 | |
1793 | 1793 | return ''; |
@@ -1830,7 +1830,7 @@ discard block |
||
1830 | 1830 | // if only one ConditionalPrimary is defined |
1831 | 1831 | return ( ! ($factor instanceof AST\ConditionalFactor)) |
1832 | 1832 | ? $this->walkConditionalPrimary($factor) |
1833 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1833 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1834 | 1834 | } |
1835 | 1835 | |
1836 | 1836 | /** |
@@ -1845,7 +1845,7 @@ discard block |
||
1845 | 1845 | if ($primary->isConditionalExpression()) { |
1846 | 1846 | $condExpr = $primary->conditionalExpression; |
1847 | 1847 | |
1848 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1848 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1849 | 1849 | } |
1850 | 1850 | } |
1851 | 1851 | |
@@ -1856,7 +1856,7 @@ discard block |
||
1856 | 1856 | { |
1857 | 1857 | $sql = ($existsExpr->not) ? 'NOT ' : ''; |
1858 | 1858 | |
1859 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1859 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1860 | 1860 | |
1861 | 1861 | return $sql; |
1862 | 1862 | } |
@@ -1900,7 +1900,7 @@ discard block |
||
1900 | 1900 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1901 | 1901 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1902 | 1902 | |
1903 | - $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' WHERE '; |
|
1903 | + $sql .= $this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' WHERE '; |
|
1904 | 1904 | |
1905 | 1905 | $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']]; |
1906 | 1906 | $sqlParts = []; |
@@ -1908,7 +1908,7 @@ discard block |
||
1908 | 1908 | foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) { |
1909 | 1909 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$targetColumn], $class, $this->platform); |
1910 | 1910 | |
1911 | - $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn; |
|
1911 | + $sqlParts[] = $sourceTableAlias.'.'.$targetColumn.' = '.$targetTableAlias.'.'.$sourceColumn; |
|
1912 | 1912 | } |
1913 | 1913 | |
1914 | 1914 | foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { |
@@ -1916,7 +1916,7 @@ discard block |
||
1916 | 1916 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
1917 | 1917 | } |
1918 | 1918 | |
1919 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' = ' . $entitySql; |
|
1919 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' = '.$entitySql; |
|
1920 | 1920 | } |
1921 | 1921 | |
1922 | 1922 | $sql .= implode(' AND ', $sqlParts); |
@@ -1932,8 +1932,8 @@ discard block |
||
1932 | 1932 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1933 | 1933 | |
1934 | 1934 | // join to target table |
1935 | - $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform) . ' ' . $joinTableAlias |
|
1936 | - . ' INNER JOIN ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) . ' ' . $targetTableAlias . ' ON '; |
|
1935 | + $sql .= $this->quoteStrategy->getJoinTableName($owningAssoc, $targetClass, $this->platform).' '.$joinTableAlias |
|
1936 | + . ' INNER JOIN '.$this->quoteStrategy->getTableName($targetClass, $this->platform).' '.$targetTableAlias.' ON '; |
|
1937 | 1937 | |
1938 | 1938 | // join conditions |
1939 | 1939 | $joinColumns = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns']; |
@@ -1942,7 +1942,7 @@ discard block |
||
1942 | 1942 | foreach ($joinColumns as $joinColumn) { |
1943 | 1943 | $targetColumn = $this->quoteStrategy->getColumnName($targetClass->fieldNames[$joinColumn['referencedColumnName']], $targetClass, $this->platform); |
1944 | 1944 | |
1945 | - $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn; |
|
1945 | + $joinSqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$targetTableAlias.'.'.$targetColumn; |
|
1946 | 1946 | } |
1947 | 1947 | |
1948 | 1948 | $sql .= implode(' AND ', $joinSqlParts); |
@@ -1954,7 +1954,7 @@ discard block |
||
1954 | 1954 | foreach ($joinColumns as $joinColumn) { |
1955 | 1955 | $targetColumn = $this->quoteStrategy->getColumnName($class->fieldNames[$joinColumn['referencedColumnName']], $class, $this->platform); |
1956 | 1956 | |
1957 | - $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn; |
|
1957 | + $sqlParts[] = $joinTableAlias.'.'.$joinColumn['name'].' = '.$sourceTableAlias.'.'.$targetColumn; |
|
1958 | 1958 | } |
1959 | 1959 | |
1960 | 1960 | foreach ($this->quoteStrategy->getIdentifierColumnNames($targetClass, $this->platform) as $targetColumnName) { |
@@ -1962,13 +1962,13 @@ discard block |
||
1962 | 1962 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
1963 | 1963 | } |
1964 | 1964 | |
1965 | - $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' IN (' . $entitySql . ')'; |
|
1965 | + $sqlParts[] = $targetTableAlias.'.'.$targetColumnName.' IN ('.$entitySql.')'; |
|
1966 | 1966 | } |
1967 | 1967 | |
1968 | 1968 | $sql .= implode(' AND ', $sqlParts); |
1969 | 1969 | } |
1970 | 1970 | |
1971 | - return $sql . ')'; |
|
1971 | + return $sql.')'; |
|
1972 | 1972 | } |
1973 | 1973 | |
1974 | 1974 | /** |
@@ -1979,7 +1979,7 @@ discard block |
||
1979 | 1979 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
1980 | 1980 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
1981 | 1981 | |
1982 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
1982 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
1983 | 1983 | } |
1984 | 1984 | |
1985 | 1985 | /** |
@@ -1988,19 +1988,19 @@ discard block |
||
1988 | 1988 | public function walkNullComparisonExpression($nullCompExpr) |
1989 | 1989 | { |
1990 | 1990 | $expression = $nullCompExpr->expression; |
1991 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
1991 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
1992 | 1992 | |
1993 | 1993 | // Handle ResultVariable |
1994 | 1994 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
1995 | - return $this->walkResultVariable($expression) . $comparison; |
|
1995 | + return $this->walkResultVariable($expression).$comparison; |
|
1996 | 1996 | } |
1997 | 1997 | |
1998 | 1998 | // Handle InputParameter mapping inclusion to ParserResult |
1999 | 1999 | if ($expression instanceof AST\InputParameter) { |
2000 | - return $this->walkInputParameter($expression) . $comparison; |
|
2000 | + return $this->walkInputParameter($expression).$comparison; |
|
2001 | 2001 | } |
2002 | 2002 | |
2003 | - return $expression->dispatch($this) . $comparison; |
|
2003 | + return $expression->dispatch($this).$comparison; |
|
2004 | 2004 | } |
2005 | 2005 | |
2006 | 2006 | /** |
@@ -2008,7 +2008,7 @@ discard block |
||
2008 | 2008 | */ |
2009 | 2009 | public function walkInExpression($inExpr) |
2010 | 2010 | { |
2011 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2011 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2012 | 2012 | |
2013 | 2013 | $sql .= ($inExpr->subselect) |
2014 | 2014 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2035,10 +2035,10 @@ discard block |
||
2035 | 2035 | } |
2036 | 2036 | |
2037 | 2037 | if ($this->useSqlTableAliases) { |
2038 | - $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.'; |
|
2038 | + $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias).'.'; |
|
2039 | 2039 | } |
2040 | 2040 | |
2041 | - $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN '); |
|
2041 | + $sql .= $class->discriminatorColumn['name'].($instanceOfExpr->not ? ' NOT IN ' : ' IN '); |
|
2042 | 2042 | $sql .= $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr); |
2043 | 2043 | |
2044 | 2044 | return $sql; |
@@ -2085,8 +2085,8 @@ discard block |
||
2085 | 2085 | $sql .= ' NOT'; |
2086 | 2086 | } |
2087 | 2087 | |
2088 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2089 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2088 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2089 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2090 | 2090 | |
2091 | 2091 | return $sql; |
2092 | 2092 | } |
@@ -2101,7 +2101,7 @@ discard block |
||
2101 | 2101 | ? $this->walkResultVariable($stringExpr) |
2102 | 2102 | : $stringExpr->dispatch($this); |
2103 | 2103 | |
2104 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2104 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2105 | 2105 | |
2106 | 2106 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2107 | 2107 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2114,7 +2114,7 @@ discard block |
||
2114 | 2114 | } |
2115 | 2115 | |
2116 | 2116 | if ($likeExpr->escapeChar) { |
2117 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2117 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2118 | 2118 | } |
2119 | 2119 | |
2120 | 2120 | return $sql; |
@@ -2141,7 +2141,7 @@ discard block |
||
2141 | 2141 | ? $leftExpr->dispatch($this) |
2142 | 2142 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2143 | 2143 | |
2144 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2144 | + $sql .= ' '.$compExpr->operator.' '; |
|
2145 | 2145 | |
2146 | 2146 | $sql .= ($rightExpr instanceof AST\Node) |
2147 | 2147 | ? $rightExpr->dispatch($this) |
@@ -2173,7 +2173,7 @@ discard block |
||
2173 | 2173 | { |
2174 | 2174 | return ($arithmeticExpr->isSimpleArithmeticExpression()) |
2175 | 2175 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2176 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2176 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2177 | 2177 | } |
2178 | 2178 | |
2179 | 2179 | /** |
@@ -2227,7 +2227,7 @@ discard block |
||
2227 | 2227 | |
2228 | 2228 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2229 | 2229 | |
2230 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2230 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2231 | 2231 | } |
2232 | 2232 | |
2233 | 2233 | /** |
@@ -2240,7 +2240,7 @@ discard block |
||
2240 | 2240 | public function walkArithmeticPrimary($primary) |
2241 | 2241 | { |
2242 | 2242 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2243 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2243 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2244 | 2244 | } |
2245 | 2245 | |
2246 | 2246 | 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 | } |