@@ -270,10 +270,10 @@ discard block |
||
270 | 270 | */ |
271 | 271 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
272 | 272 | { |
273 | - $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : ''; |
|
273 | + $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : ''; |
|
274 | 274 | |
275 | - if (! isset($this->tableAliasMap[$tableName])) { |
|
276 | - $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++; |
|
275 | + if ( ! isset($this->tableAliasMap[$tableName])) { |
|
276 | + $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++; |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | return $this->tableAliasMap[$tableName]; |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | */ |
292 | 292 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
293 | 293 | { |
294 | - $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : ''; |
|
294 | + $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : ''; |
|
295 | 295 | |
296 | 296 | $this->tableAliasMap[$tableName] = $alias; |
297 | 297 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | */ |
306 | 306 | public function getSQLColumnAlias() |
307 | 307 | { |
308 | - return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++); |
|
308 | + return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++); |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | /** |
@@ -332,14 +332,14 @@ discard block |
||
332 | 332 | |
333 | 333 | // If this is a joined association we must use left joins to preserve the correct result. |
334 | 334 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
335 | - $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
335 | + $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
336 | 336 | |
337 | 337 | $sqlParts = []; |
338 | 338 | |
339 | 339 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
340 | 340 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
341 | 341 | |
342 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
342 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias); |
@@ -363,14 +363,14 @@ discard block |
||
363 | 363 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
364 | 364 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
365 | 365 | |
366 | - $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
366 | + $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
367 | 367 | |
368 | 368 | $sqlParts = []; |
369 | 369 | |
370 | 370 | foreach ($subClass->getIdentifierColumns($this->em) as $column) { |
371 | 371 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
372 | 372 | |
373 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
373 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
374 | 374 | } |
375 | 375 | |
376 | 376 | $sql .= implode(' AND ', $sqlParts); |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | $qComp = $this->queryComponents[$dqlAlias]; |
392 | 392 | $association = $qComp['relation']; |
393 | 393 | |
394 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
394 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
395 | 395 | continue; |
396 | 396 | } |
397 | 397 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $property = $qComp['metadata']->getProperty($fieldName); |
400 | 400 | $tableName = $property->getTableName(); |
401 | 401 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
402 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
402 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
403 | 403 | |
404 | 404 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
405 | 405 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | } |
408 | 408 | |
409 | 409 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
410 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
410 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
411 | 411 | } |
412 | 412 | } |
413 | 413 | |
@@ -447,19 +447,19 @@ discard block |
||
447 | 447 | $discrColumnType = $discrColumn->getType(); |
448 | 448 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
449 | 449 | $sqlTableAlias = $this->useSqlTableAliases |
450 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
450 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
451 | 451 | : ''; |
452 | 452 | |
453 | 453 | $sqlParts[] = sprintf( |
454 | 454 | '%s IN (%s)', |
455 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
455 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
456 | 456 | implode(', ', $values) |
457 | 457 | ); |
458 | 458 | } |
459 | 459 | |
460 | 460 | $sql = implode(' AND ', $sqlParts); |
461 | 461 | |
462 | - return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql; |
|
462 | + return isset($sqlParts[1]) ? '('.$sql.')' : $sql; |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | /** |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | */ |
473 | 473 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
474 | 474 | { |
475 | - if (! $this->em->hasFilters()) { |
|
475 | + if ( ! $this->em->hasFilters()) { |
|
476 | 476 | return ''; |
477 | 477 | } |
478 | 478 | |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
506 | 506 | |
507 | 507 | if ($filterExpr !== '') { |
508 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
508 | + $filterClauses[] = '('.$filterExpr.')'; |
|
509 | 509 | } |
510 | 510 | } |
511 | 511 | |
@@ -536,11 +536,11 @@ discard block |
||
536 | 536 | $sql .= $this->walkOrderByClause($AST->orderByClause); |
537 | 537 | } |
538 | 538 | |
539 | - if (! $AST->orderByClause) { |
|
539 | + if ( ! $AST->orderByClause) { |
|
540 | 540 | $orderBySql = $this->generateOrderedCollectionOrderByItems(); |
541 | 541 | |
542 | 542 | if ($orderBySql) { |
543 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
543 | + $sql .= ' ORDER BY '.$orderBySql; |
|
544 | 544 | } |
545 | 545 | } |
546 | 546 | |
@@ -553,11 +553,11 @@ discard block |
||
553 | 553 | } |
554 | 554 | |
555 | 555 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
556 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
556 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
557 | 557 | } |
558 | 558 | |
559 | 559 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
560 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
560 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
561 | 561 | } |
562 | 562 | |
563 | 563 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | } |
566 | 566 | |
567 | 567 | foreach ($this->selectedClasses as $selectedClass) { |
568 | - if (! $selectedClass['class']->isVersioned()) { |
|
568 | + if ( ! $selectedClass['class']->isVersioned()) { |
|
569 | 569 | throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName()); |
570 | 570 | } |
571 | 571 | } |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
615 | 615 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
616 | 616 | |
617 | - $sqlParts[] = $tableAlias . '.' . $quotedColumnName; |
|
617 | + $sqlParts[] = $tableAlias.'.'.$quotedColumnName; |
|
618 | 618 | } |
619 | 619 | |
620 | 620 | return implode(', ', $sqlParts); |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | { |
633 | 633 | $class = $this->queryComponents[$identificationVariable]['metadata']; |
634 | 634 | |
635 | - if (! $fieldName) { |
|
635 | + if ( ! $fieldName) { |
|
636 | 636 | return $this->getSQLTableAlias($class->getTableName(), $identificationVariable); |
637 | 637 | } |
638 | 638 | |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | $property = $class->getProperty($fieldName); |
662 | 662 | |
663 | 663 | if ($this->useSqlTableAliases) { |
664 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
664 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
665 | 665 | } |
666 | 666 | |
667 | 667 | $sql .= $this->platform->quoteIdentifier($property->getColumnName()); |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
676 | 676 | $association = $class->getProperty($fieldName); |
677 | 677 | |
678 | - if (! $association->isOwningSide()) { |
|
678 | + if ( ! $association->isOwningSide()) { |
|
679 | 679 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
680 | 680 | } |
681 | 681 | |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | $joinColumn = reset($joinColumns); |
690 | 690 | |
691 | 691 | if ($this->useSqlTableAliases) { |
692 | - $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.'; |
|
692 | + $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.'; |
|
693 | 693 | } |
694 | 694 | |
695 | 695 | $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | */ |
708 | 708 | public function walkSelectClause($selectClause) |
709 | 709 | { |
710 | - $sql = 'SELECT ' . ($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
710 | + $sql = 'SELECT '.($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
711 | 711 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
712 | 712 | |
713 | 713 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) { |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | |
751 | 751 | $sqlSelectExpressions[] = sprintf( |
752 | 752 | '%s AS %s', |
753 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform), |
|
753 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform), |
|
754 | 754 | $sqlColumnAlias |
755 | 755 | ); |
756 | 756 | |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | |
761 | 761 | // Add foreign key columns of class and also parent classes |
762 | 762 | foreach ($class->getPropertiesIterator() as $association) { |
763 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
763 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
764 | 764 | || ( ! $addMetaColumns && ! $association->isPrimaryKey())) { |
765 | 765 | continue; |
766 | 766 | } |
@@ -775,7 +775,7 @@ discard block |
||
775 | 775 | $columnAlias = $this->getSQLColumnAlias(); |
776 | 776 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
777 | 777 | |
778 | - if (! $joinColumn->getType()) { |
|
778 | + if ( ! $joinColumn->getType()) { |
|
779 | 779 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
780 | 780 | } |
781 | 781 | |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | } |
792 | 792 | |
793 | 793 | // Add foreign key columns to SQL, if necessary |
794 | - if (! $addMetaColumns) { |
|
794 | + if ( ! $addMetaColumns) { |
|
795 | 795 | continue; |
796 | 796 | } |
797 | 797 | |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | continue; |
806 | 806 | } |
807 | 807 | |
808 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
808 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
809 | 809 | continue; |
810 | 810 | } |
811 | 811 | |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | $columnAlias = $this->getSQLColumnAlias(); |
820 | 820 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
821 | 821 | |
822 | - if (! $joinColumn->getType()) { |
|
822 | + if ( ! $joinColumn->getType()) { |
|
823 | 823 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
824 | 824 | } |
825 | 825 | |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | } |
837 | 837 | } |
838 | 838 | |
839 | - return $sql . implode(', ', $sqlSelectExpressions); |
|
839 | + return $sql.implode(', ', $sqlSelectExpressions); |
|
840 | 840 | } |
841 | 841 | |
842 | 842 | /** |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
852 | 852 | } |
853 | 853 | |
854 | - return ' FROM ' . implode(', ', $sqlParts); |
|
854 | + return ' FROM '.implode(', ', $sqlParts); |
|
855 | 855 | } |
856 | 856 | |
857 | 857 | /** |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | $class = $this->queryComponents[$alias]['metadata']; |
900 | 900 | $association = $class->getProperty($fieldName); |
901 | 901 | |
902 | - if (! $association->isOwningSide()) { |
|
902 | + if ( ! $association->isOwningSide()) { |
|
903 | 903 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
904 | 904 | } |
905 | 905 | |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
957 | 957 | |
958 | 958 | $sql = $this->platform->appendLockHint( |
959 | - $tableName . ' ' . $tableAlias, |
|
959 | + $tableName.' '.$tableAlias, |
|
960 | 960 | $this->query->getHint(Query::HINT_LOCK_MODE) |
961 | 961 | ); |
962 | 962 | |
@@ -966,11 +966,11 @@ discard block |
||
966 | 966 | |
967 | 967 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
968 | 968 | |
969 | - if (! $buildNestedJoins) { |
|
970 | - return $sql . $classTableInheritanceJoins; |
|
969 | + if ( ! $buildNestedJoins) { |
|
970 | + return $sql.$classTableInheritanceJoins; |
|
971 | 971 | } |
972 | 972 | |
973 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
973 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
974 | 974 | } |
975 | 975 | |
976 | 976 | /** |
@@ -1006,7 +1006,7 @@ discard block |
||
1006 | 1006 | : $association; |
1007 | 1007 | |
1008 | 1008 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
1009 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
1009 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
1010 | 1010 | if ($association instanceof ToManyAssociationMetadata) { |
1011 | 1011 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
1012 | 1012 | } |
@@ -1060,7 +1060,7 @@ discard block |
||
1060 | 1060 | } |
1061 | 1061 | |
1062 | 1062 | $targetTableJoin = [ |
1063 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1063 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1064 | 1064 | 'condition' => implode(' AND ', $conditions), |
1065 | 1065 | ]; |
1066 | 1066 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1087,7 +1087,7 @@ discard block |
||
1087 | 1087 | ); |
1088 | 1088 | } |
1089 | 1089 | |
1090 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1090 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1091 | 1091 | |
1092 | 1092 | // Join target table |
1093 | 1093 | $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1125,7 +1125,7 @@ discard block |
||
1125 | 1125 | } |
1126 | 1126 | |
1127 | 1127 | $targetTableJoin = [ |
1128 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1128 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1129 | 1129 | 'condition' => implode(' AND ', $conditions), |
1130 | 1130 | ]; |
1131 | 1131 | } else { |
@@ -1133,23 +1133,23 @@ discard block |
||
1133 | 1133 | } |
1134 | 1134 | |
1135 | 1135 | // Handle WITH clause |
1136 | - $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1136 | + $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1137 | 1137 | |
1138 | 1138 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1139 | 1139 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1140 | 1140 | |
1141 | 1141 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1142 | 1142 | if ($withCondition) { |
1143 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1143 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1144 | 1144 | } else { |
1145 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1145 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1146 | 1146 | } |
1147 | 1147 | } else { |
1148 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1148 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1149 | 1149 | } |
1150 | 1150 | |
1151 | 1151 | if ($withCondition) { |
1152 | - $sql .= ' AND ' . $withCondition; |
|
1152 | + $sql .= ' AND '.$withCondition; |
|
1153 | 1153 | } |
1154 | 1154 | |
1155 | 1155 | // Apply the indexes |
@@ -1183,7 +1183,7 @@ discard block |
||
1183 | 1183 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1184 | 1184 | } |
1185 | 1185 | |
1186 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1186 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1187 | 1187 | } |
1188 | 1188 | |
1189 | 1189 | /** |
@@ -1200,10 +1200,10 @@ discard block |
||
1200 | 1200 | $this->orderedColumnsMap[$sql] = $type; |
1201 | 1201 | |
1202 | 1202 | if ($expr instanceof AST\Subselect) { |
1203 | - return '(' . $sql . ') ' . $type; |
|
1203 | + return '('.$sql.') '.$type; |
|
1204 | 1204 | } |
1205 | 1205 | |
1206 | - return $sql . ' ' . $type; |
|
1206 | + return $sql.' '.$type; |
|
1207 | 1207 | } |
1208 | 1208 | |
1209 | 1209 | /** |
@@ -1211,7 +1211,7 @@ discard block |
||
1211 | 1211 | */ |
1212 | 1212 | public function walkHavingClause($havingClause) |
1213 | 1213 | { |
1214 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1214 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1215 | 1215 | } |
1216 | 1216 | |
1217 | 1217 | /** |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | $conditions = []; |
1235 | 1235 | |
1236 | 1236 | if ($join->conditionalExpression) { |
1237 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1237 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1238 | 1238 | } |
1239 | 1239 | |
1240 | 1240 | $isUnconditionalJoin = empty($conditions); |
@@ -1259,7 +1259,7 @@ discard block |
||
1259 | 1259 | } |
1260 | 1260 | |
1261 | 1261 | if ($conditions) { |
1262 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1262 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1263 | 1263 | } |
1264 | 1264 | |
1265 | 1265 | break; |
@@ -1289,7 +1289,7 @@ discard block |
||
1289 | 1289 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1290 | 1290 | } |
1291 | 1291 | |
1292 | - return $sql . implode(', ', $scalarExpressions) . ')'; |
|
1292 | + return $sql.implode(', ', $scalarExpressions).')'; |
|
1293 | 1293 | } |
1294 | 1294 | |
1295 | 1295 | /** |
@@ -1309,7 +1309,7 @@ discard block |
||
1309 | 1309 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1310 | 1310 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1311 | 1311 | |
1312 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1312 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1313 | 1313 | } |
1314 | 1314 | |
1315 | 1315 | /** |
@@ -1322,11 +1322,11 @@ discard block |
||
1322 | 1322 | $sql = 'CASE'; |
1323 | 1323 | |
1324 | 1324 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1325 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1326 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1325 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1326 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1327 | 1327 | } |
1328 | 1328 | |
1329 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1329 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1330 | 1330 | |
1331 | 1331 | return $sql; |
1332 | 1332 | } |
@@ -1340,14 +1340,14 @@ discard block |
||
1340 | 1340 | */ |
1341 | 1341 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1342 | 1342 | { |
1343 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1343 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1344 | 1344 | |
1345 | 1345 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1346 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1347 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1346 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1347 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1348 | 1348 | } |
1349 | 1349 | |
1350 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1350 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1351 | 1351 | |
1352 | 1352 | return $sql; |
1353 | 1353 | } |
@@ -1388,7 +1388,7 @@ discard block |
||
1388 | 1388 | |
1389 | 1389 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1390 | 1390 | |
1391 | - if (! $hidden) { |
|
1391 | + if ( ! $hidden) { |
|
1392 | 1392 | $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType()); |
1393 | 1393 | $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; |
1394 | 1394 | } |
@@ -1409,11 +1409,11 @@ discard block |
||
1409 | 1409 | $columnAlias = $this->getSQLColumnAlias(); |
1410 | 1410 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1411 | 1411 | |
1412 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1412 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1413 | 1413 | |
1414 | 1414 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1415 | 1415 | |
1416 | - if (! $hidden) { |
|
1416 | + if ( ! $hidden) { |
|
1417 | 1417 | // Conceptually we could resolve field type here by traverse through AST to retrieve field type, |
1418 | 1418 | // but this is not a feasible solution; assume 'string'. |
1419 | 1419 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
@@ -1424,11 +1424,11 @@ discard block |
||
1424 | 1424 | $columnAlias = $this->getSQLColumnAlias(); |
1425 | 1425 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1426 | 1426 | |
1427 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1427 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1428 | 1428 | |
1429 | 1429 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1430 | 1430 | |
1431 | - if (! $hidden) { |
|
1431 | + if ( ! $hidden) { |
|
1432 | 1432 | // We cannot resolve field type here; assume 'string'. |
1433 | 1433 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1434 | 1434 | } |
@@ -1452,7 +1452,7 @@ discard block |
||
1452 | 1452 | $class = $queryComp['metadata']; |
1453 | 1453 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1454 | 1454 | |
1455 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1455 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1456 | 1456 | $this->selectedClasses[$dqlAlias] = [ |
1457 | 1457 | 'class' => $class, |
1458 | 1458 | 'dqlAlias' => $dqlAlias, |
@@ -1464,7 +1464,7 @@ discard block |
||
1464 | 1464 | |
1465 | 1465 | // Select all fields from the queried class |
1466 | 1466 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
1467 | - if (! ($property instanceof FieldMetadata)) { |
|
1467 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1468 | 1468 | continue; |
1469 | 1469 | } |
1470 | 1470 | |
@@ -1499,7 +1499,7 @@ discard block |
||
1499 | 1499 | $subClass = $this->em->getClassMetadata($subClassName); |
1500 | 1500 | |
1501 | 1501 | foreach ($subClass->getPropertiesIterator() as $fieldName => $property) { |
1502 | - if (! ($property instanceof FieldMetadata)) { |
|
1502 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1503 | 1503 | continue; |
1504 | 1504 | } |
1505 | 1505 | |
@@ -1538,7 +1538,7 @@ discard block |
||
1538 | 1538 | */ |
1539 | 1539 | public function walkQuantifiedExpression($qExpr) |
1540 | 1540 | { |
1541 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1541 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1542 | 1542 | } |
1543 | 1543 | |
1544 | 1544 | /** |
@@ -1578,7 +1578,7 @@ discard block |
||
1578 | 1578 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1579 | 1579 | } |
1580 | 1580 | |
1581 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1581 | + return ' FROM '.implode(', ', $sqlParts); |
|
1582 | 1582 | } |
1583 | 1583 | |
1584 | 1584 | /** |
@@ -1586,7 +1586,7 @@ discard block |
||
1586 | 1586 | */ |
1587 | 1587 | public function walkSimpleSelectClause($simpleSelectClause) |
1588 | 1588 | { |
1589 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1589 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1590 | 1590 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1591 | 1591 | } |
1592 | 1592 | |
@@ -1620,7 +1620,7 @@ discard block |
||
1620 | 1620 | break; |
1621 | 1621 | |
1622 | 1622 | case $e instanceof AST\Subselect: |
1623 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1623 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1624 | 1624 | break; |
1625 | 1625 | |
1626 | 1626 | case $e instanceof AST\PathExpression: |
@@ -1629,7 +1629,7 @@ discard block |
||
1629 | 1629 | $class = $qComp['metadata']; |
1630 | 1630 | $fieldType = $class->getProperty($e->field)->getType(); |
1631 | 1631 | |
1632 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1632 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1633 | 1633 | break; |
1634 | 1634 | |
1635 | 1635 | case $e instanceof AST\Literal: |
@@ -1643,11 +1643,11 @@ discard block |
||
1643 | 1643 | break; |
1644 | 1644 | } |
1645 | 1645 | |
1646 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1646 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1647 | 1647 | break; |
1648 | 1648 | |
1649 | 1649 | default: |
1650 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1650 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1651 | 1651 | break; |
1652 | 1652 | } |
1653 | 1653 | |
@@ -1680,10 +1680,10 @@ discard block |
||
1680 | 1680 | case $expr instanceof AST\Subselect: |
1681 | 1681 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1682 | 1682 | |
1683 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1683 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1684 | 1684 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1685 | 1685 | |
1686 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1686 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1687 | 1687 | break; |
1688 | 1688 | |
1689 | 1689 | case $expr instanceof AST\Functions\FunctionNode: |
@@ -1700,7 +1700,7 @@ discard block |
||
1700 | 1700 | $columnAlias = $this->getSQLColumnAlias(); |
1701 | 1701 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1702 | 1702 | |
1703 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1703 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1704 | 1704 | break; |
1705 | 1705 | |
1706 | 1706 | case $expr instanceof AST\ParenthesisExpression: |
@@ -1720,8 +1720,8 @@ discard block |
||
1720 | 1720 | */ |
1721 | 1721 | public function walkAggregateExpression($aggExpression) |
1722 | 1722 | { |
1723 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1724 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1723 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1724 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1725 | 1725 | } |
1726 | 1726 | |
1727 | 1727 | /** |
@@ -1735,7 +1735,7 @@ discard block |
||
1735 | 1735 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1736 | 1736 | } |
1737 | 1737 | |
1738 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1738 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1739 | 1739 | } |
1740 | 1740 | |
1741 | 1741 | /** |
@@ -1744,7 +1744,7 @@ discard block |
||
1744 | 1744 | public function walkGroupByItem($groupByItem) |
1745 | 1745 | { |
1746 | 1746 | // StateFieldPathExpression |
1747 | - if (! is_string($groupByItem)) { |
|
1747 | + if ( ! is_string($groupByItem)) { |
|
1748 | 1748 | return $this->walkPathExpression($groupByItem); |
1749 | 1749 | } |
1750 | 1750 | |
@@ -1798,7 +1798,7 @@ discard block |
||
1798 | 1798 | { |
1799 | 1799 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1800 | 1800 | $tableName = $class->getTableName(); |
1801 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1801 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1802 | 1802 | |
1803 | 1803 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1804 | 1804 | |
@@ -1814,12 +1814,12 @@ discard block |
||
1814 | 1814 | { |
1815 | 1815 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1816 | 1816 | $tableName = $class->getTableName(); |
1817 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1817 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1818 | 1818 | |
1819 | 1819 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1820 | 1820 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1821 | 1821 | |
1822 | - return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1822 | + return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1823 | 1823 | } |
1824 | 1824 | |
1825 | 1825 | /** |
@@ -1830,7 +1830,7 @@ discard block |
||
1830 | 1830 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1831 | 1831 | $this->useSqlTableAliases = false; |
1832 | 1832 | |
1833 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1833 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1834 | 1834 | $newValue = $updateItem->newValue; |
1835 | 1835 | |
1836 | 1836 | switch (true) { |
@@ -1874,7 +1874,7 @@ discard block |
||
1874 | 1874 | |
1875 | 1875 | if ($filterClauses) { |
1876 | 1876 | if ($condSql) { |
1877 | - $condSql = '(' . $condSql . ') AND '; |
|
1877 | + $condSql = '('.$condSql.') AND '; |
|
1878 | 1878 | } |
1879 | 1879 | |
1880 | 1880 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1882,11 +1882,11 @@ discard block |
||
1882 | 1882 | } |
1883 | 1883 | |
1884 | 1884 | if ($condSql) { |
1885 | - return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1885 | + return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1886 | 1886 | } |
1887 | 1887 | |
1888 | 1888 | if ($discrSql) { |
1889 | - return ' WHERE ' . $discrSql; |
|
1889 | + return ' WHERE '.$discrSql; |
|
1890 | 1890 | } |
1891 | 1891 | |
1892 | 1892 | return ''; |
@@ -1899,7 +1899,7 @@ discard block |
||
1899 | 1899 | { |
1900 | 1900 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1901 | 1901 | // if only one ConditionalTerm is defined |
1902 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1902 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1903 | 1903 | return $this->walkConditionalTerm($condExpr); |
1904 | 1904 | } |
1905 | 1905 | |
@@ -1913,7 +1913,7 @@ discard block |
||
1913 | 1913 | { |
1914 | 1914 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1915 | 1915 | // if only one ConditionalFactor is defined |
1916 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1916 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1917 | 1917 | return $this->walkConditionalFactor($condTerm); |
1918 | 1918 | } |
1919 | 1919 | |
@@ -1929,7 +1929,7 @@ discard block |
||
1929 | 1929 | // if only one ConditionalPrimary is defined |
1930 | 1930 | return ! ($factor instanceof AST\ConditionalFactor) |
1931 | 1931 | ? $this->walkConditionalPrimary($factor) |
1932 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1932 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1933 | 1933 | } |
1934 | 1934 | |
1935 | 1935 | /** |
@@ -1944,7 +1944,7 @@ discard block |
||
1944 | 1944 | if ($primary->isConditionalExpression()) { |
1945 | 1945 | $condExpr = $primary->conditionalExpression; |
1946 | 1946 | |
1947 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1947 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1948 | 1948 | } |
1949 | 1949 | |
1950 | 1950 | return ''; |
@@ -1957,7 +1957,7 @@ discard block |
||
1957 | 1957 | { |
1958 | 1958 | $sql = $existsExpr->not ? 'NOT ' : ''; |
1959 | 1959 | |
1960 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1960 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1961 | 1961 | |
1962 | 1962 | return $sql; |
1963 | 1963 | } |
@@ -2005,7 +2005,7 @@ discard block |
||
2005 | 2005 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
2006 | 2006 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2007 | 2007 | |
2008 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
2008 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
2009 | 2009 | |
2010 | 2010 | $sqlParts = []; |
2011 | 2011 | |
@@ -2026,7 +2026,7 @@ discard block |
||
2026 | 2026 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2027 | 2027 | } |
2028 | 2028 | |
2029 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2029 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2030 | 2030 | } |
2031 | 2031 | |
2032 | 2032 | $sql .= implode(' AND ', $sqlParts); |
@@ -2040,7 +2040,7 @@ discard block |
||
2040 | 2040 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2041 | 2041 | |
2042 | 2042 | // join to target table |
2043 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2043 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2044 | 2044 | |
2045 | 2045 | // join conditions |
2046 | 2046 | $joinSqlParts = []; |
@@ -2089,13 +2089,13 @@ discard block |
||
2089 | 2089 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2090 | 2090 | } |
2091 | 2091 | |
2092 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2092 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2093 | 2093 | } |
2094 | 2094 | |
2095 | 2095 | $sql .= implode(' AND ', $sqlParts); |
2096 | 2096 | } |
2097 | 2097 | |
2098 | - return $sql . ')'; |
|
2098 | + return $sql.')'; |
|
2099 | 2099 | } |
2100 | 2100 | |
2101 | 2101 | /** |
@@ -2106,7 +2106,7 @@ discard block |
||
2106 | 2106 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2107 | 2107 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2108 | 2108 | |
2109 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2109 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2110 | 2110 | } |
2111 | 2111 | |
2112 | 2112 | /** |
@@ -2115,19 +2115,19 @@ discard block |
||
2115 | 2115 | public function walkNullComparisonExpression($nullCompExpr) |
2116 | 2116 | { |
2117 | 2117 | $expression = $nullCompExpr->expression; |
2118 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2118 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2119 | 2119 | |
2120 | 2120 | // Handle ResultVariable |
2121 | 2121 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2122 | - return $this->walkResultVariable($expression) . $comparison; |
|
2122 | + return $this->walkResultVariable($expression).$comparison; |
|
2123 | 2123 | } |
2124 | 2124 | |
2125 | 2125 | // Handle InputParameter mapping inclusion to ParserResult |
2126 | 2126 | if ($expression instanceof AST\InputParameter) { |
2127 | - return $this->walkInputParameter($expression) . $comparison; |
|
2127 | + return $this->walkInputParameter($expression).$comparison; |
|
2128 | 2128 | } |
2129 | 2129 | |
2130 | - return $expression->dispatch($this) . $comparison; |
|
2130 | + return $expression->dispatch($this).$comparison; |
|
2131 | 2131 | } |
2132 | 2132 | |
2133 | 2133 | /** |
@@ -2135,7 +2135,7 @@ discard block |
||
2135 | 2135 | */ |
2136 | 2136 | public function walkInExpression($inExpr) |
2137 | 2137 | { |
2138 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2138 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2139 | 2139 | |
2140 | 2140 | $sql .= $inExpr->subselect |
2141 | 2141 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2160,12 +2160,12 @@ discard block |
||
2160 | 2160 | $discrColumnType = $discrColumn->getType(); |
2161 | 2161 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2162 | 2162 | $sqlTableAlias = $this->useSqlTableAliases |
2163 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2163 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2164 | 2164 | : ''; |
2165 | 2165 | |
2166 | 2166 | return sprintf( |
2167 | 2167 | '%s %sIN %s', |
2168 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2168 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2169 | 2169 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2170 | 2170 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2171 | 2171 | ); |
@@ -2209,8 +2209,8 @@ discard block |
||
2209 | 2209 | $sql .= ' NOT'; |
2210 | 2210 | } |
2211 | 2211 | |
2212 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2213 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2212 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2213 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2214 | 2214 | |
2215 | 2215 | return $sql; |
2216 | 2216 | } |
@@ -2225,7 +2225,7 @@ discard block |
||
2225 | 2225 | ? $this->walkResultVariable($stringExpr) |
2226 | 2226 | : $stringExpr->dispatch($this); |
2227 | 2227 | |
2228 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2228 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2229 | 2229 | |
2230 | 2230 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2231 | 2231 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2238,7 +2238,7 @@ discard block |
||
2238 | 2238 | } |
2239 | 2239 | |
2240 | 2240 | if ($likeExpr->escapeChar) { |
2241 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2241 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2242 | 2242 | } |
2243 | 2243 | |
2244 | 2244 | return $sql; |
@@ -2265,7 +2265,7 @@ discard block |
||
2265 | 2265 | ? $leftExpr->dispatch($this) |
2266 | 2266 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2267 | 2267 | |
2268 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2268 | + $sql .= ' '.$compExpr->operator.' '; |
|
2269 | 2269 | |
2270 | 2270 | $sql .= $rightExpr instanceof AST\Node |
2271 | 2271 | ? $rightExpr->dispatch($this) |
@@ -2301,7 +2301,7 @@ discard block |
||
2301 | 2301 | { |
2302 | 2302 | return $arithmeticExpr->isSimpleArithmeticExpression() |
2303 | 2303 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2304 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2304 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2305 | 2305 | } |
2306 | 2306 | |
2307 | 2307 | /** |
@@ -2309,7 +2309,7 @@ discard block |
||
2309 | 2309 | */ |
2310 | 2310 | public function walkSimpleArithmeticExpression($simpleArithmeticExpr) |
2311 | 2311 | { |
2312 | - if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2312 | + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2313 | 2313 | return $this->walkArithmeticTerm($simpleArithmeticExpr); |
2314 | 2314 | } |
2315 | 2315 | |
@@ -2329,7 +2329,7 @@ discard block |
||
2329 | 2329 | |
2330 | 2330 | // Phase 2 AST optimization: Skip processing of ArithmeticTerm |
2331 | 2331 | // if only one ArithmeticFactor is defined |
2332 | - if (! ($term instanceof AST\ArithmeticTerm)) { |
|
2332 | + if ( ! ($term instanceof AST\ArithmeticTerm)) { |
|
2333 | 2333 | return $this->walkArithmeticFactor($term); |
2334 | 2334 | } |
2335 | 2335 | |
@@ -2349,13 +2349,13 @@ discard block |
||
2349 | 2349 | |
2350 | 2350 | // Phase 2 AST optimization: Skip processing of ArithmeticFactor |
2351 | 2351 | // if only one ArithmeticPrimary is defined |
2352 | - if (! ($factor instanceof AST\ArithmeticFactor)) { |
|
2352 | + if ( ! ($factor instanceof AST\ArithmeticFactor)) { |
|
2353 | 2353 | return $this->walkArithmeticPrimary($factor); |
2354 | 2354 | } |
2355 | 2355 | |
2356 | 2356 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2357 | 2357 | |
2358 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2358 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2359 | 2359 | } |
2360 | 2360 | |
2361 | 2361 | /** |
@@ -2368,7 +2368,7 @@ discard block |
||
2368 | 2368 | public function walkArithmeticPrimary($primary) |
2369 | 2369 | { |
2370 | 2370 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2371 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2371 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2372 | 2372 | } |
2373 | 2373 | |
2374 | 2374 | if ($primary instanceof AST\Node) { |
@@ -2426,7 +2426,7 @@ discard block |
||
2426 | 2426 | $entityClassName = $entityClass->getClassName(); |
2427 | 2427 | |
2428 | 2428 | if ($entityClassName !== $rootClass->getClassName()) { |
2429 | - if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2429 | + if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2430 | 2430 | throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName()); |
2431 | 2431 | } |
2432 | 2432 | } |
@@ -2438,6 +2438,6 @@ discard block |
||
2438 | 2438 | $sqlParameterList[] = $this->conn->quote($discriminator); |
2439 | 2439 | } |
2440 | 2440 | |
2441 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2441 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2442 | 2442 | } |
2443 | 2443 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $keys = $e->participants->getKeys(); |
45 | 45 | self::assertEquals([1, 2], $keys); |
46 | 46 | |
47 | - $participants = $this->em->createQuery('SELECT p FROM ' . GH7661Participant::class . ' p INDEX BY p.user')->getResult(); |
|
47 | + $participants = $this->em->createQuery('SELECT p FROM '.GH7661Participant::class.' p INDEX BY p.user')->getResult(); |
|
48 | 48 | $keys = array_keys($participants); |
49 | 49 | self::assertEquals([1, 2], $keys); |
50 | 50 | } |