@@ -272,10 +272,10 @@ discard block |
||
272 | 272 | */ |
273 | 273 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
274 | 274 | { |
275 | - $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : ''; |
|
275 | + $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : ''; |
|
276 | 276 | |
277 | - if (! isset($this->tableAliasMap[$tableName])) { |
|
278 | - $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++; |
|
277 | + if ( ! isset($this->tableAliasMap[$tableName])) { |
|
278 | + $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++; |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | return $this->tableAliasMap[$tableName]; |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | */ |
294 | 294 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
295 | 295 | { |
296 | - $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : ''; |
|
296 | + $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : ''; |
|
297 | 297 | |
298 | 298 | $this->tableAliasMap[$tableName] = $alias; |
299 | 299 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | public function getSQLColumnAlias() |
309 | 309 | { |
310 | - return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++); |
|
310 | + return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
@@ -334,14 +334,14 @@ discard block |
||
334 | 334 | |
335 | 335 | // If this is a joined association we must use left joins to preserve the correct result. |
336 | 336 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
337 | - $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
337 | + $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
338 | 338 | |
339 | 339 | $sqlParts = []; |
340 | 340 | |
341 | 341 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
342 | 342 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
343 | 343 | |
344 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
344 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
345 | 345 | } |
346 | 346 | |
347 | 347 | $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias); |
@@ -365,14 +365,14 @@ discard block |
||
365 | 365 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
366 | 366 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
367 | 367 | |
368 | - $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
368 | + $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
369 | 369 | |
370 | 370 | $sqlParts = []; |
371 | 371 | |
372 | 372 | foreach ($subClass->getIdentifierColumns($this->em) as $column) { |
373 | 373 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
374 | 374 | |
375 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
375 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
376 | 376 | } |
377 | 377 | |
378 | 378 | $sql .= implode(' AND ', $sqlParts); |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | $qComp = $this->queryComponents[$dqlAlias]; |
394 | 394 | $association = $qComp['relation']; |
395 | 395 | |
396 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
396 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
397 | 397 | continue; |
398 | 398 | } |
399 | 399 | |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | $property = $qComp['metadata']->getProperty($fieldName); |
402 | 402 | $tableName = $property->getTableName(); |
403 | 403 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
404 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
404 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
405 | 405 | |
406 | 406 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
407 | 407 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | } |
410 | 410 | |
411 | 411 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
412 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
412 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
413 | 413 | } |
414 | 414 | } |
415 | 415 | |
@@ -449,19 +449,19 @@ discard block |
||
449 | 449 | $discrColumnType = $discrColumn->getType(); |
450 | 450 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
451 | 451 | $sqlTableAlias = $this->useSqlTableAliases |
452 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
452 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
453 | 453 | : ''; |
454 | 454 | |
455 | 455 | $sqlParts[] = sprintf( |
456 | 456 | '%s IN (%s)', |
457 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
457 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
458 | 458 | implode(', ', $values) |
459 | 459 | ); |
460 | 460 | } |
461 | 461 | |
462 | 462 | $sql = implode(' AND ', $sqlParts); |
463 | 463 | |
464 | - return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql; |
|
464 | + return isset($sqlParts[1]) ? '('.$sql.')' : $sql; |
|
465 | 465 | } |
466 | 466 | |
467 | 467 | /** |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | */ |
475 | 475 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
476 | 476 | { |
477 | - if (! $this->em->hasFilters()) { |
|
477 | + if ( ! $this->em->hasFilters()) { |
|
478 | 478 | return ''; |
479 | 479 | } |
480 | 480 | |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
508 | 508 | |
509 | 509 | if ($filterExpr !== '') { |
510 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
510 | + $filterClauses[] = '('.$filterExpr.')'; |
|
511 | 511 | } |
512 | 512 | } |
513 | 513 | |
@@ -538,11 +538,11 @@ discard block |
||
538 | 538 | $sql .= $this->walkOrderByClause($AST->orderByClause); |
539 | 539 | } |
540 | 540 | |
541 | - if (! $AST->orderByClause) { |
|
541 | + if ( ! $AST->orderByClause) { |
|
542 | 542 | $orderBySql = $this->generateOrderedCollectionOrderByItems(); |
543 | 543 | |
544 | 544 | if ($orderBySql) { |
545 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
545 | + $sql .= ' ORDER BY '.$orderBySql; |
|
546 | 546 | } |
547 | 547 | } |
548 | 548 | |
@@ -555,11 +555,11 @@ discard block |
||
555 | 555 | } |
556 | 556 | |
557 | 557 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
558 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
558 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
559 | 559 | } |
560 | 560 | |
561 | 561 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
562 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
562 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
563 | 563 | } |
564 | 564 | |
565 | 565 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | } |
568 | 568 | |
569 | 569 | foreach ($this->selectedClasses as $selectedClass) { |
570 | - if (! $selectedClass['class']->isVersioned()) { |
|
570 | + if ( ! $selectedClass['class']->isVersioned()) { |
|
571 | 571 | throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName()); |
572 | 572 | } |
573 | 573 | } |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
617 | 617 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
618 | 618 | |
619 | - $sqlParts[] = $tableAlias . '.' . $quotedColumnName; |
|
619 | + $sqlParts[] = $tableAlias.'.'.$quotedColumnName; |
|
620 | 620 | } |
621 | 621 | |
622 | 622 | return implode(', ', $sqlParts); |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | { |
635 | 635 | $class = $this->queryComponents[$identificationVariable]['metadata']; |
636 | 636 | |
637 | - if (! $fieldName) { |
|
637 | + if ( ! $fieldName) { |
|
638 | 638 | return $this->getSQLTableAlias($class->getTableName(), $identificationVariable); |
639 | 639 | } |
640 | 640 | |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | $property = $class->getProperty($fieldName); |
664 | 664 | |
665 | 665 | if ($this->useSqlTableAliases) { |
666 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
666 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
667 | 667 | } |
668 | 668 | |
669 | 669 | $sql .= $this->platform->quoteIdentifier($property->getColumnName()); |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
678 | 678 | $association = $class->getProperty($fieldName); |
679 | 679 | |
680 | - if (! $association->isOwningSide()) { |
|
680 | + if ( ! $association->isOwningSide()) { |
|
681 | 681 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
682 | 682 | } |
683 | 683 | |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | $joinColumn = reset($joinColumns); |
692 | 692 | |
693 | 693 | if ($this->useSqlTableAliases) { |
694 | - $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.'; |
|
694 | + $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.'; |
|
695 | 695 | } |
696 | 696 | |
697 | 697 | $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | */ |
710 | 710 | public function walkSelectClause($selectClause) |
711 | 711 | { |
712 | - $sql = 'SELECT ' . ($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
712 | + $sql = 'SELECT '.($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
713 | 713 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
714 | 714 | |
715 | 715 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) { |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | |
753 | 753 | $sqlSelectExpressions[] = sprintf( |
754 | 754 | '%s AS %s', |
755 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform), |
|
755 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform), |
|
756 | 756 | $sqlColumnAlias |
757 | 757 | ); |
758 | 758 | |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | |
763 | 763 | // Add foreign key columns of class and also parent classes |
764 | 764 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
765 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
765 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
766 | 766 | || ( ! $addMetaColumns && ! $association->isPrimaryKey())) { |
767 | 767 | continue; |
768 | 768 | } |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | $columnAlias = $this->getSQLColumnAlias(); |
778 | 778 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
779 | 779 | |
780 | - if (! $joinColumn->getType()) { |
|
780 | + if ( ! $joinColumn->getType()) { |
|
781 | 781 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
782 | 782 | } |
783 | 783 | |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | } |
794 | 794 | |
795 | 795 | // Add foreign key columns to SQL, if necessary |
796 | - if (! $addMetaColumns) { |
|
796 | + if ( ! $addMetaColumns) { |
|
797 | 797 | continue; |
798 | 798 | } |
799 | 799 | |
@@ -807,7 +807,7 @@ discard block |
||
807 | 807 | continue; |
808 | 808 | } |
809 | 809 | |
810 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
810 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
811 | 811 | continue; |
812 | 812 | } |
813 | 813 | |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | $columnAlias = $this->getSQLColumnAlias(); |
822 | 822 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
823 | 823 | |
824 | - if (! $joinColumn->getType()) { |
|
824 | + if ( ! $joinColumn->getType()) { |
|
825 | 825 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
826 | 826 | } |
827 | 827 | |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | } |
839 | 839 | } |
840 | 840 | |
841 | - return $sql . implode(', ', $sqlSelectExpressions); |
|
841 | + return $sql.implode(', ', $sqlSelectExpressions); |
|
842 | 842 | } |
843 | 843 | |
844 | 844 | /** |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
854 | 854 | } |
855 | 855 | |
856 | - return ' FROM ' . implode(', ', $sqlParts); |
|
856 | + return ' FROM '.implode(', ', $sqlParts); |
|
857 | 857 | } |
858 | 858 | |
859 | 859 | /** |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
929 | 929 | |
930 | 930 | $sql = $this->platform->appendLockHint( |
931 | - $tableName . ' ' . $tableAlias, |
|
931 | + $tableName.' '.$tableAlias, |
|
932 | 932 | $this->query->getHint(Query::HINT_LOCK_MODE) |
933 | 933 | ); |
934 | 934 | |
@@ -938,11 +938,11 @@ discard block |
||
938 | 938 | |
939 | 939 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
940 | 940 | |
941 | - if (! $buildNestedJoins) { |
|
942 | - return $sql . $classTableInheritanceJoins; |
|
941 | + if ( ! $buildNestedJoins) { |
|
942 | + return $sql.$classTableInheritanceJoins; |
|
943 | 943 | } |
944 | 944 | |
945 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
945 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
946 | 946 | } |
947 | 947 | |
948 | 948 | /** |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | : $association; |
979 | 979 | |
980 | 980 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
981 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
981 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
982 | 982 | if ($association instanceof ToManyAssociationMetadata) { |
983 | 983 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
984 | 984 | } |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | } |
1033 | 1033 | |
1034 | 1034 | $targetTableJoin = [ |
1035 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1035 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1036 | 1036 | 'condition' => implode(' AND ', $conditions), |
1037 | 1037 | ]; |
1038 | 1038 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1059,7 +1059,7 @@ discard block |
||
1059 | 1059 | ); |
1060 | 1060 | } |
1061 | 1061 | |
1062 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1062 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1063 | 1063 | |
1064 | 1064 | // Join target table |
1065 | 1065 | $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1097,7 +1097,7 @@ discard block |
||
1097 | 1097 | } |
1098 | 1098 | |
1099 | 1099 | $targetTableJoin = [ |
1100 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1100 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1101 | 1101 | 'condition' => implode(' AND ', $conditions), |
1102 | 1102 | ]; |
1103 | 1103 | } else { |
@@ -1105,23 +1105,23 @@ discard block |
||
1105 | 1105 | } |
1106 | 1106 | |
1107 | 1107 | // Handle WITH clause |
1108 | - $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1108 | + $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1109 | 1109 | |
1110 | 1110 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1111 | 1111 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1112 | 1112 | |
1113 | 1113 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1114 | 1114 | if ($withCondition) { |
1115 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1115 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1116 | 1116 | } else { |
1117 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1117 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1118 | 1118 | } |
1119 | 1119 | } else { |
1120 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1120 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1121 | 1121 | } |
1122 | 1122 | |
1123 | 1123 | if ($withCondition) { |
1124 | - $sql .= ' AND ' . $withCondition; |
|
1124 | + $sql .= ' AND '.$withCondition; |
|
1125 | 1125 | } |
1126 | 1126 | |
1127 | 1127 | // Apply the indexes |
@@ -1155,7 +1155,7 @@ discard block |
||
1155 | 1155 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1156 | 1156 | } |
1157 | 1157 | |
1158 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1158 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1159 | 1159 | } |
1160 | 1160 | |
1161 | 1161 | /** |
@@ -1172,10 +1172,10 @@ discard block |
||
1172 | 1172 | $this->orderedColumnsMap[$sql] = $type; |
1173 | 1173 | |
1174 | 1174 | if ($expr instanceof AST\Subselect) { |
1175 | - return '(' . $sql . ') ' . $type; |
|
1175 | + return '('.$sql.') '.$type; |
|
1176 | 1176 | } |
1177 | 1177 | |
1178 | - return $sql . ' ' . $type; |
|
1178 | + return $sql.' '.$type; |
|
1179 | 1179 | } |
1180 | 1180 | |
1181 | 1181 | /** |
@@ -1183,7 +1183,7 @@ discard block |
||
1183 | 1183 | */ |
1184 | 1184 | public function walkHavingClause($havingClause) |
1185 | 1185 | { |
1186 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1186 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1187 | 1187 | } |
1188 | 1188 | |
1189 | 1189 | /** |
@@ -1206,7 +1206,7 @@ discard block |
||
1206 | 1206 | $conditions = []; |
1207 | 1207 | |
1208 | 1208 | if ($join->conditionalExpression) { |
1209 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1209 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1210 | 1210 | } |
1211 | 1211 | |
1212 | 1212 | $isUnconditionalJoin = empty($conditions); |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | } |
1232 | 1232 | |
1233 | 1233 | if ($conditions) { |
1234 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1234 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1235 | 1235 | } |
1236 | 1236 | |
1237 | 1237 | break; |
@@ -1261,7 +1261,7 @@ discard block |
||
1261 | 1261 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1262 | 1262 | } |
1263 | 1263 | |
1264 | - return $sql . implode(', ', $scalarExpressions) . ')'; |
|
1264 | + return $sql.implode(', ', $scalarExpressions).')'; |
|
1265 | 1265 | } |
1266 | 1266 | |
1267 | 1267 | /** |
@@ -1281,7 +1281,7 @@ discard block |
||
1281 | 1281 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1282 | 1282 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1283 | 1283 | |
1284 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1284 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1285 | 1285 | } |
1286 | 1286 | |
1287 | 1287 | /** |
@@ -1294,11 +1294,11 @@ discard block |
||
1294 | 1294 | $sql = 'CASE'; |
1295 | 1295 | |
1296 | 1296 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1297 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1298 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1297 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1298 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1299 | 1299 | } |
1300 | 1300 | |
1301 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1301 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1302 | 1302 | |
1303 | 1303 | return $sql; |
1304 | 1304 | } |
@@ -1312,14 +1312,14 @@ discard block |
||
1312 | 1312 | */ |
1313 | 1313 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1314 | 1314 | { |
1315 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1315 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1316 | 1316 | |
1317 | 1317 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1318 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1319 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1318 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1319 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1320 | 1320 | } |
1321 | 1321 | |
1322 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1322 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1323 | 1323 | |
1324 | 1324 | return $sql; |
1325 | 1325 | } |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | |
1361 | 1361 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1362 | 1362 | |
1363 | - if (! $hidden) { |
|
1363 | + if ( ! $hidden) { |
|
1364 | 1364 | $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType()); |
1365 | 1365 | $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; |
1366 | 1366 | } |
@@ -1381,11 +1381,11 @@ discard block |
||
1381 | 1381 | $columnAlias = $this->getSQLColumnAlias(); |
1382 | 1382 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1383 | 1383 | |
1384 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1384 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1385 | 1385 | |
1386 | 1386 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1387 | 1387 | |
1388 | - if (! $hidden) { |
|
1388 | + if ( ! $hidden) { |
|
1389 | 1389 | // Conceptually we could resolve field type here by traverse through AST to retrieve field type, |
1390 | 1390 | // but this is not a feasible solution; assume 'string'. |
1391 | 1391 | $type = 'string'; |
@@ -1401,11 +1401,11 @@ discard block |
||
1401 | 1401 | $columnAlias = $this->getSQLColumnAlias(); |
1402 | 1402 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1403 | 1403 | |
1404 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1404 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1405 | 1405 | |
1406 | 1406 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1407 | 1407 | |
1408 | - if (! $hidden) { |
|
1408 | + if ( ! $hidden) { |
|
1409 | 1409 | // We cannot resolve field type here; assume 'string'. |
1410 | 1410 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1411 | 1411 | } |
@@ -1429,7 +1429,7 @@ discard block |
||
1429 | 1429 | $class = $queryComp['metadata']; |
1430 | 1430 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1431 | 1431 | |
1432 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1432 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1433 | 1433 | $this->selectedClasses[$dqlAlias] = [ |
1434 | 1434 | 'class' => $class, |
1435 | 1435 | 'dqlAlias' => $dqlAlias, |
@@ -1441,7 +1441,7 @@ discard block |
||
1441 | 1441 | |
1442 | 1442 | // Select all fields from the queried class |
1443 | 1443 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1444 | - if (! ($property instanceof FieldMetadata)) { |
|
1444 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1445 | 1445 | continue; |
1446 | 1446 | } |
1447 | 1447 | |
@@ -1476,7 +1476,7 @@ discard block |
||
1476 | 1476 | $subClass = $this->em->getClassMetadata($subClassName); |
1477 | 1477 | |
1478 | 1478 | foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1479 | - if (! ($property instanceof FieldMetadata)) { |
|
1479 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1480 | 1480 | continue; |
1481 | 1481 | } |
1482 | 1482 | |
@@ -1515,7 +1515,7 @@ discard block |
||
1515 | 1515 | */ |
1516 | 1516 | public function walkQuantifiedExpression($qExpr) |
1517 | 1517 | { |
1518 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1518 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1519 | 1519 | } |
1520 | 1520 | |
1521 | 1521 | /** |
@@ -1555,7 +1555,7 @@ discard block |
||
1555 | 1555 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1556 | 1556 | } |
1557 | 1557 | |
1558 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1558 | + return ' FROM '.implode(', ', $sqlParts); |
|
1559 | 1559 | } |
1560 | 1560 | |
1561 | 1561 | /** |
@@ -1563,7 +1563,7 @@ discard block |
||
1563 | 1563 | */ |
1564 | 1564 | public function walkSimpleSelectClause($simpleSelectClause) |
1565 | 1565 | { |
1566 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1566 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1567 | 1567 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1568 | 1568 | } |
1569 | 1569 | |
@@ -1597,7 +1597,7 @@ discard block |
||
1597 | 1597 | break; |
1598 | 1598 | |
1599 | 1599 | case $e instanceof AST\Subselect: |
1600 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1600 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1601 | 1601 | break; |
1602 | 1602 | |
1603 | 1603 | case $e instanceof AST\PathExpression: |
@@ -1606,7 +1606,7 @@ discard block |
||
1606 | 1606 | $class = $qComp['metadata']; |
1607 | 1607 | $fieldType = $class->getProperty($e->field)->getType(); |
1608 | 1608 | |
1609 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1609 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1610 | 1610 | break; |
1611 | 1611 | |
1612 | 1612 | case $e instanceof AST\Literal: |
@@ -1620,11 +1620,11 @@ discard block |
||
1620 | 1620 | break; |
1621 | 1621 | } |
1622 | 1622 | |
1623 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1623 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1624 | 1624 | break; |
1625 | 1625 | |
1626 | 1626 | default: |
1627 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1627 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1628 | 1628 | break; |
1629 | 1629 | } |
1630 | 1630 | |
@@ -1657,10 +1657,10 @@ discard block |
||
1657 | 1657 | case $expr instanceof AST\Subselect: |
1658 | 1658 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1659 | 1659 | |
1660 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1660 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1661 | 1661 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1662 | 1662 | |
1663 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1663 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1664 | 1664 | break; |
1665 | 1665 | |
1666 | 1666 | case $expr instanceof AST\Functions\FunctionNode: |
@@ -1677,7 +1677,7 @@ discard block |
||
1677 | 1677 | $columnAlias = $this->getSQLColumnAlias(); |
1678 | 1678 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1679 | 1679 | |
1680 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1680 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1681 | 1681 | break; |
1682 | 1682 | |
1683 | 1683 | case $expr instanceof AST\ParenthesisExpression: |
@@ -1697,8 +1697,8 @@ discard block |
||
1697 | 1697 | */ |
1698 | 1698 | public function walkAggregateExpression($aggExpression) |
1699 | 1699 | { |
1700 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1701 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1700 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1701 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1702 | 1702 | } |
1703 | 1703 | |
1704 | 1704 | /** |
@@ -1712,7 +1712,7 @@ discard block |
||
1712 | 1712 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1713 | 1713 | } |
1714 | 1714 | |
1715 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1715 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1716 | 1716 | } |
1717 | 1717 | |
1718 | 1718 | /** |
@@ -1721,7 +1721,7 @@ discard block |
||
1721 | 1721 | public function walkGroupByItem($groupByItem) |
1722 | 1722 | { |
1723 | 1723 | // StateFieldPathExpression |
1724 | - if (! is_string($groupByItem)) { |
|
1724 | + if ( ! is_string($groupByItem)) { |
|
1725 | 1725 | return $this->walkPathExpression($groupByItem); |
1726 | 1726 | } |
1727 | 1727 | |
@@ -1775,7 +1775,7 @@ discard block |
||
1775 | 1775 | { |
1776 | 1776 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1777 | 1777 | $tableName = $class->getTableName(); |
1778 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1778 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1779 | 1779 | |
1780 | 1780 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1781 | 1781 | |
@@ -1791,12 +1791,12 @@ discard block |
||
1791 | 1791 | { |
1792 | 1792 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1793 | 1793 | $tableName = $class->getTableName(); |
1794 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1794 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1795 | 1795 | |
1796 | 1796 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1797 | 1797 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1798 | 1798 | |
1799 | - return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1799 | + return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1800 | 1800 | } |
1801 | 1801 | |
1802 | 1802 | /** |
@@ -1807,7 +1807,7 @@ discard block |
||
1807 | 1807 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1808 | 1808 | $this->useSqlTableAliases = false; |
1809 | 1809 | |
1810 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1810 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1811 | 1811 | $newValue = $updateItem->newValue; |
1812 | 1812 | |
1813 | 1813 | switch (true) { |
@@ -1851,7 +1851,7 @@ discard block |
||
1851 | 1851 | |
1852 | 1852 | if ($filterClauses) { |
1853 | 1853 | if ($condSql) { |
1854 | - $condSql = '(' . $condSql . ') AND '; |
|
1854 | + $condSql = '('.$condSql.') AND '; |
|
1855 | 1855 | } |
1856 | 1856 | |
1857 | 1857 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1859,11 +1859,11 @@ discard block |
||
1859 | 1859 | } |
1860 | 1860 | |
1861 | 1861 | if ($condSql) { |
1862 | - return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1862 | + return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1863 | 1863 | } |
1864 | 1864 | |
1865 | 1865 | if ($discrSql) { |
1866 | - return ' WHERE ' . $discrSql; |
|
1866 | + return ' WHERE '.$discrSql; |
|
1867 | 1867 | } |
1868 | 1868 | |
1869 | 1869 | return ''; |
@@ -1876,7 +1876,7 @@ discard block |
||
1876 | 1876 | { |
1877 | 1877 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1878 | 1878 | // if only one ConditionalTerm is defined |
1879 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1879 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1880 | 1880 | return $this->walkConditionalTerm($condExpr); |
1881 | 1881 | } |
1882 | 1882 | |
@@ -1890,7 +1890,7 @@ discard block |
||
1890 | 1890 | { |
1891 | 1891 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1892 | 1892 | // if only one ConditionalFactor is defined |
1893 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1893 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1894 | 1894 | return $this->walkConditionalFactor($condTerm); |
1895 | 1895 | } |
1896 | 1896 | |
@@ -1906,7 +1906,7 @@ discard block |
||
1906 | 1906 | // if only one ConditionalPrimary is defined |
1907 | 1907 | return ! ($factor instanceof AST\ConditionalFactor) |
1908 | 1908 | ? $this->walkConditionalPrimary($factor) |
1909 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1909 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1910 | 1910 | } |
1911 | 1911 | |
1912 | 1912 | /** |
@@ -1921,7 +1921,7 @@ discard block |
||
1921 | 1921 | if ($primary->isConditionalExpression()) { |
1922 | 1922 | $condExpr = $primary->conditionalExpression; |
1923 | 1923 | |
1924 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1924 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1925 | 1925 | } |
1926 | 1926 | } |
1927 | 1927 | |
@@ -1932,7 +1932,7 @@ discard block |
||
1932 | 1932 | { |
1933 | 1933 | $sql = $existsExpr->not ? 'NOT ' : ''; |
1934 | 1934 | |
1935 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1935 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1936 | 1936 | |
1937 | 1937 | return $sql; |
1938 | 1938 | } |
@@ -1980,7 +1980,7 @@ discard block |
||
1980 | 1980 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1981 | 1981 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1982 | 1982 | |
1983 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
1983 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
1984 | 1984 | |
1985 | 1985 | $sqlParts = []; |
1986 | 1986 | |
@@ -2001,7 +2001,7 @@ discard block |
||
2001 | 2001 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2002 | 2002 | } |
2003 | 2003 | |
2004 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2004 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2005 | 2005 | } |
2006 | 2006 | |
2007 | 2007 | $sql .= implode(' AND ', $sqlParts); |
@@ -2015,7 +2015,7 @@ discard block |
||
2015 | 2015 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2016 | 2016 | |
2017 | 2017 | // join to target table |
2018 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2018 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2019 | 2019 | |
2020 | 2020 | // join conditions |
2021 | 2021 | $joinSqlParts = []; |
@@ -2064,13 +2064,13 @@ discard block |
||
2064 | 2064 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2065 | 2065 | } |
2066 | 2066 | |
2067 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2067 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2068 | 2068 | } |
2069 | 2069 | |
2070 | 2070 | $sql .= implode(' AND ', $sqlParts); |
2071 | 2071 | } |
2072 | 2072 | |
2073 | - return $sql . ')'; |
|
2073 | + return $sql.')'; |
|
2074 | 2074 | } |
2075 | 2075 | |
2076 | 2076 | /** |
@@ -2081,7 +2081,7 @@ discard block |
||
2081 | 2081 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2082 | 2082 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2083 | 2083 | |
2084 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2084 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2085 | 2085 | } |
2086 | 2086 | |
2087 | 2087 | /** |
@@ -2090,19 +2090,19 @@ discard block |
||
2090 | 2090 | public function walkNullComparisonExpression($nullCompExpr) |
2091 | 2091 | { |
2092 | 2092 | $expression = $nullCompExpr->expression; |
2093 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2093 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2094 | 2094 | |
2095 | 2095 | // Handle ResultVariable |
2096 | 2096 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2097 | - return $this->walkResultVariable($expression) . $comparison; |
|
2097 | + return $this->walkResultVariable($expression).$comparison; |
|
2098 | 2098 | } |
2099 | 2099 | |
2100 | 2100 | // Handle InputParameter mapping inclusion to ParserResult |
2101 | 2101 | if ($expression instanceof AST\InputParameter) { |
2102 | - return $this->walkInputParameter($expression) . $comparison; |
|
2102 | + return $this->walkInputParameter($expression).$comparison; |
|
2103 | 2103 | } |
2104 | 2104 | |
2105 | - return $expression->dispatch($this) . $comparison; |
|
2105 | + return $expression->dispatch($this).$comparison; |
|
2106 | 2106 | } |
2107 | 2107 | |
2108 | 2108 | /** |
@@ -2110,7 +2110,7 @@ discard block |
||
2110 | 2110 | */ |
2111 | 2111 | public function walkInExpression($inExpr) |
2112 | 2112 | { |
2113 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2113 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2114 | 2114 | |
2115 | 2115 | $sql .= $inExpr->subselect |
2116 | 2116 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2135,12 +2135,12 @@ discard block |
||
2135 | 2135 | $discrColumnType = $discrColumn->getType(); |
2136 | 2136 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2137 | 2137 | $sqlTableAlias = $this->useSqlTableAliases |
2138 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2138 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2139 | 2139 | : ''; |
2140 | 2140 | |
2141 | 2141 | return sprintf( |
2142 | 2142 | '%s %sIN %s', |
2143 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2143 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2144 | 2144 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2145 | 2145 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2146 | 2146 | ); |
@@ -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 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $method->setAccessible(true); |
43 | 43 | /** @var ORMQuery\ResultSetMapping $mapping */ |
44 | 44 | $mapping = $method->invoke($query); |
45 | - foreach($types as $key => $expectedType) { |
|
45 | + foreach ($types as $key => $expectedType) { |
|
46 | 46 | $alias = array_search($key, $mapping->scalarMappings); |
47 | 47 | self::assertInstanceOf( |
48 | 48 | $expectedType, |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | $query->free(); |
54 | 54 | } catch (Exception $e) { |
55 | - $this->fail($e->getMessage() . "\n" . $e->getTraceAsString()); |
|
55 | + $this->fail($e->getMessage()."\n".$e->getTraceAsString()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | } |
@@ -8,6 +8,6 @@ |
||
8 | 8 | interface TypableNode |
9 | 9 | { |
10 | 10 | |
11 | - public function getReturnType (): string; |
|
11 | + public function getReturnType(): string; |
|
12 | 12 | |
13 | 13 | } |