@@ -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 | |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | $col = ''; |
663 | 663 | |
664 | 664 | if ($this->useSqlTableAliases) { |
665 | - $col .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
665 | + $col .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
666 | 666 | } |
667 | 667 | |
668 | 668 | $col .= $this->platform->quoteIdentifier($property->getColumnName()); |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
684 | 684 | $association = $class->getProperty($fieldName); |
685 | 685 | |
686 | - if (! $association->isOwningSide()) { |
|
686 | + if ( ! $association->isOwningSide()) { |
|
687 | 687 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
688 | 688 | } |
689 | 689 | |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | $joinColumn = reset($joinColumns); |
698 | 698 | |
699 | 699 | if ($this->useSqlTableAliases) { |
700 | - $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.'; |
|
700 | + $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.'; |
|
701 | 701 | } |
702 | 702 | |
703 | 703 | $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -715,7 +715,7 @@ discard block |
||
715 | 715 | */ |
716 | 716 | public function walkSelectClause($selectClause) |
717 | 717 | { |
718 | - $sql = 'SELECT ' . ($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
718 | + $sql = 'SELECT '.($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
719 | 719 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
720 | 720 | |
721 | 721 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) { |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | |
759 | 759 | $sqlSelectExpressions[] = sprintf( |
760 | 760 | '%s AS %s', |
761 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform), |
|
761 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform), |
|
762 | 762 | $sqlColumnAlias |
763 | 763 | ); |
764 | 764 | |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | |
769 | 769 | // Add foreign key columns of class and also parent classes |
770 | 770 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
771 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
771 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
772 | 772 | || ( ! $addMetaColumns && ! $association->isPrimaryKey())) { |
773 | 773 | continue; |
774 | 774 | } |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | $columnAlias = $this->getSQLColumnAlias(); |
784 | 784 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
785 | 785 | |
786 | - if (! $joinColumn->getType()) { |
|
786 | + if ( ! $joinColumn->getType()) { |
|
787 | 787 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
788 | 788 | } |
789 | 789 | |
@@ -799,7 +799,7 @@ discard block |
||
799 | 799 | } |
800 | 800 | |
801 | 801 | // Add foreign key columns to SQL, if necessary |
802 | - if (! $addMetaColumns) { |
|
802 | + if ( ! $addMetaColumns) { |
|
803 | 803 | continue; |
804 | 804 | } |
805 | 805 | |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | continue; |
814 | 814 | } |
815 | 815 | |
816 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
816 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
817 | 817 | continue; |
818 | 818 | } |
819 | 819 | |
@@ -827,7 +827,7 @@ discard block |
||
827 | 827 | $columnAlias = $this->getSQLColumnAlias(); |
828 | 828 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
829 | 829 | |
830 | - if (! $joinColumn->getType()) { |
|
830 | + if ( ! $joinColumn->getType()) { |
|
831 | 831 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
832 | 832 | } |
833 | 833 | |
@@ -844,7 +844,7 @@ discard block |
||
844 | 844 | } |
845 | 845 | } |
846 | 846 | |
847 | - return $sql . implode(', ', $sqlSelectExpressions); |
|
847 | + return $sql.implode(', ', $sqlSelectExpressions); |
|
848 | 848 | } |
849 | 849 | |
850 | 850 | /** |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
860 | 860 | } |
861 | 861 | |
862 | - return ' FROM ' . implode(', ', $sqlParts); |
|
862 | + return ' FROM '.implode(', ', $sqlParts); |
|
863 | 863 | } |
864 | 864 | |
865 | 865 | /** |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
935 | 935 | |
936 | 936 | $sql = $this->platform->appendLockHint( |
937 | - $tableName . ' ' . $tableAlias, |
|
937 | + $tableName.' '.$tableAlias, |
|
938 | 938 | $this->query->getHint(Query::HINT_LOCK_MODE) |
939 | 939 | ); |
940 | 940 | |
@@ -944,11 +944,11 @@ discard block |
||
944 | 944 | |
945 | 945 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
946 | 946 | |
947 | - if (! $buildNestedJoins) { |
|
948 | - return $sql . $classTableInheritanceJoins; |
|
947 | + if ( ! $buildNestedJoins) { |
|
948 | + return $sql.$classTableInheritanceJoins; |
|
949 | 949 | } |
950 | 950 | |
951 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
951 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
952 | 952 | } |
953 | 953 | |
954 | 954 | /** |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | : $association; |
985 | 985 | |
986 | 986 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
987 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
987 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
988 | 988 | if ($association instanceof ToManyAssociationMetadata) { |
989 | 989 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
990 | 990 | } |
@@ -1038,7 +1038,7 @@ discard block |
||
1038 | 1038 | } |
1039 | 1039 | |
1040 | 1040 | $targetTableJoin = [ |
1041 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1041 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1042 | 1042 | 'condition' => implode(' AND ', $conditions), |
1043 | 1043 | ]; |
1044 | 1044 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1065,7 +1065,7 @@ discard block |
||
1065 | 1065 | ); |
1066 | 1066 | } |
1067 | 1067 | |
1068 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1068 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1069 | 1069 | |
1070 | 1070 | // Join target table |
1071 | 1071 | $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1103,7 +1103,7 @@ discard block |
||
1103 | 1103 | } |
1104 | 1104 | |
1105 | 1105 | $targetTableJoin = [ |
1106 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1106 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1107 | 1107 | 'condition' => implode(' AND ', $conditions), |
1108 | 1108 | ]; |
1109 | 1109 | } else { |
@@ -1111,23 +1111,23 @@ discard block |
||
1111 | 1111 | } |
1112 | 1112 | |
1113 | 1113 | // Handle WITH clause |
1114 | - $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1114 | + $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1115 | 1115 | |
1116 | 1116 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1117 | 1117 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1118 | 1118 | |
1119 | 1119 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1120 | 1120 | if ($withCondition) { |
1121 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1121 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1122 | 1122 | } else { |
1123 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1123 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1124 | 1124 | } |
1125 | 1125 | } else { |
1126 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1126 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1127 | 1127 | } |
1128 | 1128 | |
1129 | 1129 | if ($withCondition) { |
1130 | - $sql .= ' AND ' . $withCondition; |
|
1130 | + $sql .= ' AND '.$withCondition; |
|
1131 | 1131 | } |
1132 | 1132 | |
1133 | 1133 | // Apply the indexes |
@@ -1161,7 +1161,7 @@ discard block |
||
1161 | 1161 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1162 | 1162 | } |
1163 | 1163 | |
1164 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1164 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1165 | 1165 | } |
1166 | 1166 | |
1167 | 1167 | /** |
@@ -1178,10 +1178,10 @@ discard block |
||
1178 | 1178 | $this->orderedColumnsMap[$sql] = $type; |
1179 | 1179 | |
1180 | 1180 | if ($expr instanceof AST\Subselect) { |
1181 | - return '(' . $sql . ') ' . $type; |
|
1181 | + return '('.$sql.') '.$type; |
|
1182 | 1182 | } |
1183 | 1183 | |
1184 | - return $sql . ' ' . $type; |
|
1184 | + return $sql.' '.$type; |
|
1185 | 1185 | } |
1186 | 1186 | |
1187 | 1187 | /** |
@@ -1189,7 +1189,7 @@ discard block |
||
1189 | 1189 | */ |
1190 | 1190 | public function walkHavingClause($havingClause) |
1191 | 1191 | { |
1192 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1192 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1193 | 1193 | } |
1194 | 1194 | |
1195 | 1195 | /** |
@@ -1212,7 +1212,7 @@ discard block |
||
1212 | 1212 | $conditions = []; |
1213 | 1213 | |
1214 | 1214 | if ($join->conditionalExpression) { |
1215 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1215 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1216 | 1216 | } |
1217 | 1217 | |
1218 | 1218 | $isUnconditionalJoin = empty($conditions); |
@@ -1237,7 +1237,7 @@ discard block |
||
1237 | 1237 | } |
1238 | 1238 | |
1239 | 1239 | if ($conditions) { |
1240 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1240 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1241 | 1241 | } |
1242 | 1242 | |
1243 | 1243 | break; |
@@ -1267,7 +1267,7 @@ discard block |
||
1267 | 1267 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1268 | 1268 | } |
1269 | 1269 | |
1270 | - return $sql . implode(', ', $scalarExpressions) . ')'; |
|
1270 | + return $sql.implode(', ', $scalarExpressions).')'; |
|
1271 | 1271 | } |
1272 | 1272 | |
1273 | 1273 | /** |
@@ -1287,7 +1287,7 @@ discard block |
||
1287 | 1287 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1288 | 1288 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1289 | 1289 | |
1290 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1290 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1291 | 1291 | } |
1292 | 1292 | |
1293 | 1293 | /** |
@@ -1300,11 +1300,11 @@ discard block |
||
1300 | 1300 | $sql = 'CASE'; |
1301 | 1301 | |
1302 | 1302 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1303 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1304 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1303 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1304 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1305 | 1305 | } |
1306 | 1306 | |
1307 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1307 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1308 | 1308 | |
1309 | 1309 | return $sql; |
1310 | 1310 | } |
@@ -1318,14 +1318,14 @@ discard block |
||
1318 | 1318 | */ |
1319 | 1319 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1320 | 1320 | { |
1321 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1321 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1322 | 1322 | |
1323 | 1323 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1324 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1325 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1324 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1325 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1326 | 1326 | } |
1327 | 1327 | |
1328 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1328 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1329 | 1329 | |
1330 | 1330 | return $sql; |
1331 | 1331 | } |
@@ -1366,7 +1366,7 @@ discard block |
||
1366 | 1366 | |
1367 | 1367 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1368 | 1368 | |
1369 | - if (! $hidden) { |
|
1369 | + if ( ! $hidden) { |
|
1370 | 1370 | $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType()); |
1371 | 1371 | $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; |
1372 | 1372 | } |
@@ -1387,11 +1387,11 @@ discard block |
||
1387 | 1387 | $columnAlias = $this->getSQLColumnAlias(); |
1388 | 1388 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1389 | 1389 | |
1390 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1390 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1391 | 1391 | |
1392 | 1392 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1393 | 1393 | |
1394 | - if (! $hidden) { |
|
1394 | + if ( ! $hidden) { |
|
1395 | 1395 | // Conceptually we could resolve field type here by traverse through AST to retrieve field type, |
1396 | 1396 | // but this is not a feasible solution; assume 'string'. |
1397 | 1397 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
@@ -1402,11 +1402,11 @@ discard block |
||
1402 | 1402 | $columnAlias = $this->getSQLColumnAlias(); |
1403 | 1403 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1404 | 1404 | |
1405 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1405 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1406 | 1406 | |
1407 | 1407 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1408 | 1408 | |
1409 | - if (! $hidden) { |
|
1409 | + if ( ! $hidden) { |
|
1410 | 1410 | // We cannot resolve field type here; assume 'string'. |
1411 | 1411 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1412 | 1412 | } |
@@ -1430,7 +1430,7 @@ discard block |
||
1430 | 1430 | $class = $queryComp['metadata']; |
1431 | 1431 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1432 | 1432 | |
1433 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1433 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1434 | 1434 | $this->selectedClasses[$dqlAlias] = [ |
1435 | 1435 | 'class' => $class, |
1436 | 1436 | 'dqlAlias' => $dqlAlias, |
@@ -1442,7 +1442,7 @@ discard block |
||
1442 | 1442 | |
1443 | 1443 | // Select all fields from the queried class |
1444 | 1444 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1445 | - if (! ($property instanceof FieldMetadata)) { |
|
1445 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1446 | 1446 | continue; |
1447 | 1447 | } |
1448 | 1448 | |
@@ -1477,7 +1477,7 @@ discard block |
||
1477 | 1477 | $subClass = $this->em->getClassMetadata($subClassName); |
1478 | 1478 | |
1479 | 1479 | foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1480 | - if (! ($property instanceof FieldMetadata)) { |
|
1480 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1481 | 1481 | continue; |
1482 | 1482 | } |
1483 | 1483 | |
@@ -1516,7 +1516,7 @@ discard block |
||
1516 | 1516 | */ |
1517 | 1517 | public function walkQuantifiedExpression($qExpr) |
1518 | 1518 | { |
1519 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1519 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1520 | 1520 | } |
1521 | 1521 | |
1522 | 1522 | /** |
@@ -1556,7 +1556,7 @@ discard block |
||
1556 | 1556 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1557 | 1557 | } |
1558 | 1558 | |
1559 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1559 | + return ' FROM '.implode(', ', $sqlParts); |
|
1560 | 1560 | } |
1561 | 1561 | |
1562 | 1562 | /** |
@@ -1564,7 +1564,7 @@ discard block |
||
1564 | 1564 | */ |
1565 | 1565 | public function walkSimpleSelectClause($simpleSelectClause) |
1566 | 1566 | { |
1567 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1567 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1568 | 1568 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1569 | 1569 | } |
1570 | 1570 | |
@@ -1598,7 +1598,7 @@ discard block |
||
1598 | 1598 | break; |
1599 | 1599 | |
1600 | 1600 | case $e instanceof AST\Subselect: |
1601 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1601 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1602 | 1602 | break; |
1603 | 1603 | |
1604 | 1604 | case $e instanceof AST\PathExpression: |
@@ -1607,7 +1607,7 @@ discard block |
||
1607 | 1607 | $class = $qComp['metadata']; |
1608 | 1608 | $fieldType = $class->getProperty($e->field)->getType(); |
1609 | 1609 | |
1610 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1610 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1611 | 1611 | break; |
1612 | 1612 | |
1613 | 1613 | case $e instanceof AST\Literal: |
@@ -1621,11 +1621,11 @@ discard block |
||
1621 | 1621 | break; |
1622 | 1622 | } |
1623 | 1623 | |
1624 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1624 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1625 | 1625 | break; |
1626 | 1626 | |
1627 | 1627 | default: |
1628 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1628 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1629 | 1629 | break; |
1630 | 1630 | } |
1631 | 1631 | |
@@ -1658,10 +1658,10 @@ discard block |
||
1658 | 1658 | case $expr instanceof AST\Subselect: |
1659 | 1659 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1660 | 1660 | |
1661 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1661 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1662 | 1662 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1663 | 1663 | |
1664 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1664 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1665 | 1665 | break; |
1666 | 1666 | |
1667 | 1667 | case $expr instanceof AST\Functions\FunctionNode: |
@@ -1678,7 +1678,7 @@ discard block |
||
1678 | 1678 | $columnAlias = $this->getSQLColumnAlias(); |
1679 | 1679 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1680 | 1680 | |
1681 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1681 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1682 | 1682 | break; |
1683 | 1683 | |
1684 | 1684 | case $expr instanceof AST\ParenthesisExpression: |
@@ -1698,8 +1698,8 @@ discard block |
||
1698 | 1698 | */ |
1699 | 1699 | public function walkAggregateExpression($aggExpression) |
1700 | 1700 | { |
1701 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1702 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1701 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1702 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1703 | 1703 | } |
1704 | 1704 | |
1705 | 1705 | /** |
@@ -1713,7 +1713,7 @@ discard block |
||
1713 | 1713 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1714 | 1714 | } |
1715 | 1715 | |
1716 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1716 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1717 | 1717 | } |
1718 | 1718 | |
1719 | 1719 | /** |
@@ -1722,7 +1722,7 @@ discard block |
||
1722 | 1722 | public function walkGroupByItem($groupByItem) |
1723 | 1723 | { |
1724 | 1724 | // StateFieldPathExpression |
1725 | - if (! is_string($groupByItem)) { |
|
1725 | + if ( ! is_string($groupByItem)) { |
|
1726 | 1726 | return $this->walkPathExpression($groupByItem); |
1727 | 1727 | } |
1728 | 1728 | |
@@ -1776,7 +1776,7 @@ discard block |
||
1776 | 1776 | { |
1777 | 1777 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1778 | 1778 | $tableName = $class->getTableName(); |
1779 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1779 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1780 | 1780 | |
1781 | 1781 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1782 | 1782 | |
@@ -1792,12 +1792,12 @@ discard block |
||
1792 | 1792 | { |
1793 | 1793 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1794 | 1794 | $tableName = $class->getTableName(); |
1795 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1795 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1796 | 1796 | |
1797 | 1797 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1798 | 1798 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1799 | 1799 | |
1800 | - return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1800 | + return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1801 | 1801 | } |
1802 | 1802 | |
1803 | 1803 | /** |
@@ -1808,7 +1808,7 @@ discard block |
||
1808 | 1808 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1809 | 1809 | $this->useSqlTableAliases = false; |
1810 | 1810 | |
1811 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1811 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1812 | 1812 | $newValue = $updateItem->newValue; |
1813 | 1813 | |
1814 | 1814 | switch (true) { |
@@ -1852,7 +1852,7 @@ discard block |
||
1852 | 1852 | |
1853 | 1853 | if ($filterClauses) { |
1854 | 1854 | if ($condSql) { |
1855 | - $condSql = '(' . $condSql . ') AND '; |
|
1855 | + $condSql = '('.$condSql.') AND '; |
|
1856 | 1856 | } |
1857 | 1857 | |
1858 | 1858 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1860,11 +1860,11 @@ discard block |
||
1860 | 1860 | } |
1861 | 1861 | |
1862 | 1862 | if ($condSql) { |
1863 | - return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1863 | + return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1864 | 1864 | } |
1865 | 1865 | |
1866 | 1866 | if ($discrSql) { |
1867 | - return ' WHERE ' . $discrSql; |
|
1867 | + return ' WHERE '.$discrSql; |
|
1868 | 1868 | } |
1869 | 1869 | |
1870 | 1870 | return ''; |
@@ -1877,7 +1877,7 @@ discard block |
||
1877 | 1877 | { |
1878 | 1878 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1879 | 1879 | // if only one ConditionalTerm is defined |
1880 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1880 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1881 | 1881 | return $this->walkConditionalTerm($condExpr); |
1882 | 1882 | } |
1883 | 1883 | |
@@ -1891,7 +1891,7 @@ discard block |
||
1891 | 1891 | { |
1892 | 1892 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1893 | 1893 | // if only one ConditionalFactor is defined |
1894 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1894 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1895 | 1895 | return $this->walkConditionalFactor($condTerm); |
1896 | 1896 | } |
1897 | 1897 | |
@@ -1907,7 +1907,7 @@ discard block |
||
1907 | 1907 | // if only one ConditionalPrimary is defined |
1908 | 1908 | return ! ($factor instanceof AST\ConditionalFactor) |
1909 | 1909 | ? $this->walkConditionalPrimary($factor) |
1910 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1910 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1911 | 1911 | } |
1912 | 1912 | |
1913 | 1913 | /** |
@@ -1922,7 +1922,7 @@ discard block |
||
1922 | 1922 | if ($primary->isConditionalExpression()) { |
1923 | 1923 | $condExpr = $primary->conditionalExpression; |
1924 | 1924 | |
1925 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1925 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1926 | 1926 | } |
1927 | 1927 | |
1928 | 1928 | return ''; |
@@ -1935,7 +1935,7 @@ discard block |
||
1935 | 1935 | { |
1936 | 1936 | $sql = $existsExpr->not ? 'NOT ' : ''; |
1937 | 1937 | |
1938 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1938 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1939 | 1939 | |
1940 | 1940 | return $sql; |
1941 | 1941 | } |
@@ -1983,7 +1983,7 @@ discard block |
||
1983 | 1983 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1984 | 1984 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1985 | 1985 | |
1986 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
1986 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
1987 | 1987 | |
1988 | 1988 | $sqlParts = []; |
1989 | 1989 | |
@@ -2004,7 +2004,7 @@ discard block |
||
2004 | 2004 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2005 | 2005 | } |
2006 | 2006 | |
2007 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2007 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2008 | 2008 | } |
2009 | 2009 | |
2010 | 2010 | $sql .= implode(' AND ', $sqlParts); |
@@ -2018,7 +2018,7 @@ discard block |
||
2018 | 2018 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2019 | 2019 | |
2020 | 2020 | // join to target table |
2021 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2021 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2022 | 2022 | |
2023 | 2023 | // join conditions |
2024 | 2024 | $joinSqlParts = []; |
@@ -2067,13 +2067,13 @@ discard block |
||
2067 | 2067 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2068 | 2068 | } |
2069 | 2069 | |
2070 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2070 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2071 | 2071 | } |
2072 | 2072 | |
2073 | 2073 | $sql .= implode(' AND ', $sqlParts); |
2074 | 2074 | } |
2075 | 2075 | |
2076 | - return $sql . ')'; |
|
2076 | + return $sql.')'; |
|
2077 | 2077 | } |
2078 | 2078 | |
2079 | 2079 | /** |
@@ -2084,7 +2084,7 @@ discard block |
||
2084 | 2084 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2085 | 2085 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2086 | 2086 | |
2087 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2087 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2088 | 2088 | } |
2089 | 2089 | |
2090 | 2090 | /** |
@@ -2093,19 +2093,19 @@ discard block |
||
2093 | 2093 | public function walkNullComparisonExpression($nullCompExpr) |
2094 | 2094 | { |
2095 | 2095 | $expression = $nullCompExpr->expression; |
2096 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2096 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2097 | 2097 | |
2098 | 2098 | // Handle ResultVariable |
2099 | 2099 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2100 | - return $this->walkResultVariable($expression) . $comparison; |
|
2100 | + return $this->walkResultVariable($expression).$comparison; |
|
2101 | 2101 | } |
2102 | 2102 | |
2103 | 2103 | // Handle InputParameter mapping inclusion to ParserResult |
2104 | 2104 | if ($expression instanceof AST\InputParameter) { |
2105 | - return $this->walkInputParameter($expression) . $comparison; |
|
2105 | + return $this->walkInputParameter($expression).$comparison; |
|
2106 | 2106 | } |
2107 | 2107 | |
2108 | - return $expression->dispatch($this) . $comparison; |
|
2108 | + return $expression->dispatch($this).$comparison; |
|
2109 | 2109 | } |
2110 | 2110 | |
2111 | 2111 | /** |
@@ -2113,7 +2113,7 @@ discard block |
||
2113 | 2113 | */ |
2114 | 2114 | public function walkInExpression($inExpr) |
2115 | 2115 | { |
2116 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2116 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2117 | 2117 | |
2118 | 2118 | $sql .= $inExpr->subselect |
2119 | 2119 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2138,12 +2138,12 @@ discard block |
||
2138 | 2138 | $discrColumnType = $discrColumn->getType(); |
2139 | 2139 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2140 | 2140 | $sqlTableAlias = $this->useSqlTableAliases |
2141 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2141 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2142 | 2142 | : ''; |
2143 | 2143 | |
2144 | 2144 | return sprintf( |
2145 | 2145 | '%s %sIN %s', |
2146 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2146 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2147 | 2147 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2148 | 2148 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2149 | 2149 | ); |
@@ -2187,8 +2187,8 @@ discard block |
||
2187 | 2187 | $sql .= ' NOT'; |
2188 | 2188 | } |
2189 | 2189 | |
2190 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2191 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2190 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2191 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2192 | 2192 | |
2193 | 2193 | return $sql; |
2194 | 2194 | } |
@@ -2203,7 +2203,7 @@ discard block |
||
2203 | 2203 | ? $this->walkResultVariable($stringExpr) |
2204 | 2204 | : $stringExpr->dispatch($this); |
2205 | 2205 | |
2206 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2206 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2207 | 2207 | |
2208 | 2208 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2209 | 2209 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2216,7 +2216,7 @@ discard block |
||
2216 | 2216 | } |
2217 | 2217 | |
2218 | 2218 | if ($likeExpr->escapeChar) { |
2219 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2219 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2220 | 2220 | } |
2221 | 2221 | |
2222 | 2222 | return $sql; |
@@ -2243,7 +2243,7 @@ discard block |
||
2243 | 2243 | ? $leftExpr->dispatch($this) |
2244 | 2244 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2245 | 2245 | |
2246 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2246 | + $sql .= ' '.$compExpr->operator.' '; |
|
2247 | 2247 | |
2248 | 2248 | $sql .= $rightExpr instanceof AST\Node |
2249 | 2249 | ? $rightExpr->dispatch($this) |
@@ -2279,7 +2279,7 @@ discard block |
||
2279 | 2279 | { |
2280 | 2280 | return $arithmeticExpr->isSimpleArithmeticExpression() |
2281 | 2281 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2282 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2282 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2283 | 2283 | } |
2284 | 2284 | |
2285 | 2285 | /** |
@@ -2287,7 +2287,7 @@ discard block |
||
2287 | 2287 | */ |
2288 | 2288 | public function walkSimpleArithmeticExpression($simpleArithmeticExpr) |
2289 | 2289 | { |
2290 | - if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2290 | + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2291 | 2291 | return $this->walkArithmeticTerm($simpleArithmeticExpr); |
2292 | 2292 | } |
2293 | 2293 | |
@@ -2307,7 +2307,7 @@ discard block |
||
2307 | 2307 | |
2308 | 2308 | // Phase 2 AST optimization: Skip processing of ArithmeticTerm |
2309 | 2309 | // if only one ArithmeticFactor is defined |
2310 | - if (! ($term instanceof AST\ArithmeticTerm)) { |
|
2310 | + if ( ! ($term instanceof AST\ArithmeticTerm)) { |
|
2311 | 2311 | return $this->walkArithmeticFactor($term); |
2312 | 2312 | } |
2313 | 2313 | |
@@ -2327,13 +2327,13 @@ discard block |
||
2327 | 2327 | |
2328 | 2328 | // Phase 2 AST optimization: Skip processing of ArithmeticFactor |
2329 | 2329 | // if only one ArithmeticPrimary is defined |
2330 | - if (! ($factor instanceof AST\ArithmeticFactor)) { |
|
2330 | + if ( ! ($factor instanceof AST\ArithmeticFactor)) { |
|
2331 | 2331 | return $this->walkArithmeticPrimary($factor); |
2332 | 2332 | } |
2333 | 2333 | |
2334 | 2334 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2335 | 2335 | |
2336 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2336 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2337 | 2337 | } |
2338 | 2338 | |
2339 | 2339 | /** |
@@ -2346,7 +2346,7 @@ discard block |
||
2346 | 2346 | public function walkArithmeticPrimary($primary) |
2347 | 2347 | { |
2348 | 2348 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2349 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2349 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2350 | 2350 | } |
2351 | 2351 | |
2352 | 2352 | if ($primary instanceof AST\Node) { |
@@ -2404,7 +2404,7 @@ discard block |
||
2404 | 2404 | $entityClassName = $entityClass->getClassName(); |
2405 | 2405 | |
2406 | 2406 | if ($entityClassName !== $rootClass->getClassName()) { |
2407 | - if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2407 | + if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2408 | 2408 | throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName()); |
2409 | 2409 | } |
2410 | 2410 | } |
@@ -2416,6 +2416,6 @@ discard block |
||
2416 | 2416 | $sqlParameterList[] = $this->conn->quote($discriminator); |
2417 | 2417 | } |
2418 | 2418 | |
2419 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2419 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2420 | 2420 | } |
2421 | 2421 | } |