@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query\Exec; |
6 | 6 | |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
69 | 69 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 'i0', $updateClause->aliasIdentificationVariable); |
70 | 70 | |
71 | - $this->insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ')' |
|
72 | - . ' SELECT i0.' . implode(', i0.', array_keys($idColumns)); |
|
71 | + $this->insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.')' |
|
72 | + . ' SELECT i0.'.implode(', i0.', array_keys($idColumns)); |
|
73 | 73 | |
74 | 74 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->getClassName(), $updateClause->aliasIdentificationVariable); |
75 | 75 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | // 3. Create and store UPDATE statements |
88 | 88 | $hierarchyClasses = array_merge( |
89 | 89 | array_map( |
90 | - function ($className) use ($em) { |
|
90 | + function($className) use ($em) { |
|
91 | 91 | return $em->getClassMetadata($className); |
92 | 92 | }, |
93 | 93 | array_reverse($primaryClass->getSubClasses()) |
@@ -143,8 +143,8 @@ discard block |
||
143 | 143 | ]; |
144 | 144 | } |
145 | 145 | |
146 | - $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
147 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
146 | + $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
147 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
148 | 148 | |
149 | 149 | $this->dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
150 | 150 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query\Exec; |
6 | 6 | |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
56 | 56 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 'i0', $primaryDqlAlias); |
57 | 57 | |
58 | - $this->insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ')' |
|
59 | - . ' SELECT i0.' . implode(', i0.', array_keys($idColumns)); |
|
58 | + $this->insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.')' |
|
59 | + . ' SELECT i0.'.implode(', i0.', array_keys($idColumns)); |
|
60 | 60 | |
61 | 61 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->getClassName(), $primaryDqlAlias); |
62 | 62 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | // 3. Create and store DELETE statements |
79 | 79 | $hierarchyClasses = array_merge( |
80 | 80 | array_map( |
81 | - function ($className) use ($em) { |
|
81 | + function($className) use ($em) { |
|
82 | 82 | return $em->getClassMetadata($className); |
83 | 83 | }, |
84 | 84 | array_reverse($primaryClass->getSubClasses()) |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | ]; |
102 | 102 | } |
103 | 103 | |
104 | - $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
105 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
104 | + $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
105 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
106 | 106 | |
107 | 107 | $this->dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
108 | 108 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query; |
6 | 6 | |
@@ -265,10 +265,10 @@ discard block |
||
265 | 265 | */ |
266 | 266 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
267 | 267 | { |
268 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
268 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
269 | 269 | |
270 | - if (! isset($this->tableAliasMap[$tableName])) { |
|
271 | - $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++; |
|
270 | + if ( ! isset($this->tableAliasMap[$tableName])) { |
|
271 | + $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++; |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | return $this->tableAliasMap[$tableName]; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | */ |
287 | 287 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
288 | 288 | { |
289 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
289 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
290 | 290 | |
291 | 291 | $this->tableAliasMap[$tableName] = $alias; |
292 | 292 | |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | */ |
301 | 301 | public function getSQLColumnAlias() |
302 | 302 | { |
303 | - return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++); |
|
303 | + return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++); |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | /** |
@@ -327,14 +327,14 @@ discard block |
||
327 | 327 | |
328 | 328 | // If this is a joined association we must use left joins to preserve the correct result. |
329 | 329 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
330 | - $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
330 | + $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
331 | 331 | |
332 | 332 | $sqlParts = []; |
333 | 333 | |
334 | 334 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
335 | 335 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
336 | 336 | |
337 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
337 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias); |
@@ -358,14 +358,14 @@ discard block |
||
358 | 358 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
359 | 359 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
360 | 360 | |
361 | - $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
361 | + $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
362 | 362 | |
363 | 363 | $sqlParts = []; |
364 | 364 | |
365 | 365 | foreach ($subClass->getIdentifierColumns($this->em) as $column) { |
366 | 366 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
367 | 367 | |
368 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
368 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
369 | 369 | } |
370 | 370 | |
371 | 371 | $sql .= implode(' AND ', $sqlParts); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $qComp = $this->queryComponents[$dqlAlias]; |
387 | 387 | $association = $qComp['relation']; |
388 | 388 | |
389 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
389 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
390 | 390 | continue; |
391 | 391 | } |
392 | 392 | |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | $property = $qComp['metadata']->getProperty($fieldName); |
395 | 395 | $tableName = $property->getTableName(); |
396 | 396 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
397 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
397 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
398 | 398 | |
399 | 399 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
400 | 400 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | } |
403 | 403 | |
404 | 404 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
405 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
405 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
406 | 406 | } |
407 | 407 | } |
408 | 408 | |
@@ -442,19 +442,19 @@ discard block |
||
442 | 442 | $discrColumnType = $discrColumn->getType(); |
443 | 443 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
444 | 444 | $sqlTableAlias = ($this->useSqlTableAliases) |
445 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
445 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
446 | 446 | : ''; |
447 | 447 | |
448 | 448 | $sqlParts[] = sprintf( |
449 | 449 | '%s IN (%s)', |
450 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
450 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
451 | 451 | implode(', ', $values) |
452 | 452 | ); |
453 | 453 | } |
454 | 454 | |
455 | 455 | $sql = implode(' AND ', $sqlParts); |
456 | 456 | |
457 | - return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql; |
|
457 | + return isset($sqlParts[1]) ? '('.$sql.')' : $sql; |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | /** |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | */ |
468 | 468 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
469 | 469 | { |
470 | - if (! $this->em->hasFilters()) { |
|
470 | + if ( ! $this->em->hasFilters()) { |
|
471 | 471 | return ''; |
472 | 472 | } |
473 | 473 | |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
501 | 501 | |
502 | 502 | if ($filterExpr !== '') { |
503 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
503 | + $filterClauses[] = '('.$filterExpr.')'; |
|
504 | 504 | } |
505 | 505 | } |
506 | 506 | |
@@ -531,11 +531,11 @@ discard block |
||
531 | 531 | $sql .= $this->walkOrderByClause($AST->orderByClause); |
532 | 532 | } |
533 | 533 | |
534 | - if (! $AST->orderByClause) { |
|
534 | + if ( ! $AST->orderByClause) { |
|
535 | 535 | $orderBySql = $this->generateOrderedCollectionOrderByItems(); |
536 | 536 | |
537 | 537 | if ($orderBySql) { |
538 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
538 | + $sql .= ' ORDER BY '.$orderBySql; |
|
539 | 539 | } |
540 | 540 | } |
541 | 541 | |
@@ -548,11 +548,11 @@ discard block |
||
548 | 548 | } |
549 | 549 | |
550 | 550 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
551 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
551 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
552 | 552 | } |
553 | 553 | |
554 | 554 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
555 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
555 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
556 | 556 | } |
557 | 557 | |
558 | 558 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | } |
561 | 561 | |
562 | 562 | foreach ($this->selectedClasses as $selectedClass) { |
563 | - if (! $selectedClass['class']->isVersioned()) { |
|
563 | + if ( ! $selectedClass['class']->isVersioned()) { |
|
564 | 564 | throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName()); |
565 | 565 | } |
566 | 566 | } |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
610 | 610 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
611 | 611 | |
612 | - $sqlParts[] = $tableAlias . '.' . $quotedColumnName; |
|
612 | + $sqlParts[] = $tableAlias.'.'.$quotedColumnName; |
|
613 | 613 | } |
614 | 614 | |
615 | 615 | return implode(', ', $sqlParts); |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | { |
628 | 628 | $class = $this->queryComponents[$identificationVariable]['metadata']; |
629 | 629 | |
630 | - if (! $fieldName) { |
|
630 | + if ( ! $fieldName) { |
|
631 | 631 | return $this->getSQLTableAlias($class->getTableName(), $identificationVariable); |
632 | 632 | } |
633 | 633 | |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | $property = $class->getProperty($fieldName); |
657 | 657 | |
658 | 658 | if ($this->useSqlTableAliases) { |
659 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
659 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
660 | 660 | } |
661 | 661 | |
662 | 662 | $sql .= $this->platform->quoteIdentifier($property->getColumnName()); |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
671 | 671 | $association = $class->getProperty($fieldName); |
672 | 672 | |
673 | - if (! $association->isOwningSide()) { |
|
673 | + if ( ! $association->isOwningSide()) { |
|
674 | 674 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
675 | 675 | } |
676 | 676 | |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | $joinColumn = reset($joinColumns); |
685 | 685 | |
686 | 686 | if ($this->useSqlTableAliases) { |
687 | - $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.'; |
|
687 | + $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.'; |
|
688 | 688 | } |
689 | 689 | |
690 | 690 | $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | */ |
703 | 703 | public function walkSelectClause($selectClause) |
704 | 704 | { |
705 | - $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
705 | + $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
706 | 706 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
707 | 707 | |
708 | 708 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) { |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | |
746 | 746 | $sqlSelectExpressions[] = sprintf( |
747 | 747 | '%s AS %s', |
748 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform), |
|
748 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform), |
|
749 | 749 | $sqlColumnAlias |
750 | 750 | ); |
751 | 751 | |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | |
756 | 756 | // Add foreign key columns of class and also parent classes |
757 | 757 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
758 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
758 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
759 | 759 | || ( ! $addMetaColumns && ! $association->isPrimaryKey())) { |
760 | 760 | continue; |
761 | 761 | } |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | $columnAlias = $this->getSQLColumnAlias(); |
771 | 771 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
772 | 772 | |
773 | - if (! $joinColumn->getType()) { |
|
773 | + if ( ! $joinColumn->getType()) { |
|
774 | 774 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
775 | 775 | } |
776 | 776 | |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | } |
787 | 787 | |
788 | 788 | // Add foreign key columns to SQL, if necessary |
789 | - if (! $addMetaColumns) { |
|
789 | + if ( ! $addMetaColumns) { |
|
790 | 790 | continue; |
791 | 791 | } |
792 | 792 | |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | continue; |
801 | 801 | } |
802 | 802 | |
803 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
803 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
804 | 804 | continue; |
805 | 805 | } |
806 | 806 | |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | $columnAlias = $this->getSQLColumnAlias(); |
815 | 815 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
816 | 816 | |
817 | - if (! $joinColumn->getType()) { |
|
817 | + if ( ! $joinColumn->getType()) { |
|
818 | 818 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
819 | 819 | } |
820 | 820 | |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
849 | 849 | } |
850 | 850 | |
851 | - return ' FROM ' . implode(', ', $sqlParts); |
|
851 | + return ' FROM '.implode(', ', $sqlParts); |
|
852 | 852 | } |
853 | 853 | |
854 | 854 | /** |
@@ -923,7 +923,7 @@ discard block |
||
923 | 923 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
924 | 924 | |
925 | 925 | $sql = $this->platform->appendLockHint( |
926 | - $tableName . ' ' . $tableAlias, |
|
926 | + $tableName.' '.$tableAlias, |
|
927 | 927 | $this->query->getHint(Query::HINT_LOCK_MODE) |
928 | 928 | ); |
929 | 929 | |
@@ -933,11 +933,11 @@ discard block |
||
933 | 933 | |
934 | 934 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
935 | 935 | |
936 | - if (! $buildNestedJoins) { |
|
937 | - return $sql . $classTableInheritanceJoins; |
|
936 | + if ( ! $buildNestedJoins) { |
|
937 | + return $sql.$classTableInheritanceJoins; |
|
938 | 938 | } |
939 | 939 | |
940 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
940 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
941 | 941 | } |
942 | 942 | |
943 | 943 | /** |
@@ -974,7 +974,7 @@ discard block |
||
974 | 974 | ; |
975 | 975 | |
976 | 976 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
977 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
977 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
978 | 978 | if ($association instanceof ToManyAssociationMetadata) { |
979 | 979 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
980 | 980 | } |
@@ -1028,7 +1028,7 @@ discard block |
||
1028 | 1028 | } |
1029 | 1029 | |
1030 | 1030 | $targetTableJoin = [ |
1031 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1031 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1032 | 1032 | 'condition' => implode(' AND ', $conditions), |
1033 | 1033 | ]; |
1034 | 1034 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1056,7 +1056,7 @@ discard block |
||
1056 | 1056 | ); |
1057 | 1057 | } |
1058 | 1058 | |
1059 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1059 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1060 | 1060 | |
1061 | 1061 | // Join target table |
1062 | 1062 | $sql .= ($joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1095,7 +1095,7 @@ discard block |
||
1095 | 1095 | } |
1096 | 1096 | |
1097 | 1097 | $targetTableJoin = [ |
1098 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1098 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1099 | 1099 | 'condition' => implode(' AND ', $conditions), |
1100 | 1100 | ]; |
1101 | 1101 | } else { |
@@ -1103,23 +1103,23 @@ discard block |
||
1103 | 1103 | } |
1104 | 1104 | |
1105 | 1105 | // Handle WITH clause |
1106 | - $withCondition = ($condExpr === null) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1106 | + $withCondition = ($condExpr === null) ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1107 | 1107 | |
1108 | 1108 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1109 | 1109 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1110 | 1110 | |
1111 | 1111 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1112 | 1112 | if ($withCondition) { |
1113 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1113 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1114 | 1114 | } else { |
1115 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1115 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1116 | 1116 | } |
1117 | 1117 | } else { |
1118 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1118 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1119 | 1119 | } |
1120 | 1120 | |
1121 | 1121 | if ($withCondition) { |
1122 | - $sql .= ' AND ' . $withCondition; |
|
1122 | + $sql .= ' AND '.$withCondition; |
|
1123 | 1123 | } |
1124 | 1124 | |
1125 | 1125 | // Apply the indexes |
@@ -1153,7 +1153,7 @@ discard block |
||
1153 | 1153 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1154 | 1154 | } |
1155 | 1155 | |
1156 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1156 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1157 | 1157 | } |
1158 | 1158 | |
1159 | 1159 | /** |
@@ -1170,10 +1170,10 @@ discard block |
||
1170 | 1170 | $this->orderedColumnsMap[$sql] = $type; |
1171 | 1171 | |
1172 | 1172 | if ($expr instanceof AST\Subselect) { |
1173 | - return '(' . $sql . ') ' . $type; |
|
1173 | + return '('.$sql.') '.$type; |
|
1174 | 1174 | } |
1175 | 1175 | |
1176 | - return $sql . ' ' . $type; |
|
1176 | + return $sql.' '.$type; |
|
1177 | 1177 | } |
1178 | 1178 | |
1179 | 1179 | /** |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | */ |
1182 | 1182 | public function walkHavingClause($havingClause) |
1183 | 1183 | { |
1184 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1184 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1185 | 1185 | } |
1186 | 1186 | |
1187 | 1187 | /** |
@@ -1204,7 +1204,7 @@ discard block |
||
1204 | 1204 | $conditions = []; |
1205 | 1205 | |
1206 | 1206 | if ($join->conditionalExpression) { |
1207 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1207 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1208 | 1208 | } |
1209 | 1209 | |
1210 | 1210 | $isUnconditionalJoin = empty($conditions); |
@@ -1229,7 +1229,7 @@ discard block |
||
1229 | 1229 | } |
1230 | 1230 | |
1231 | 1231 | if ($conditions) { |
1232 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1232 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1233 | 1233 | } |
1234 | 1234 | |
1235 | 1235 | break; |
@@ -1259,7 +1259,7 @@ discard block |
||
1259 | 1259 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1260 | 1260 | } |
1261 | 1261 | |
1262 | - $sql .= implode(', ', $scalarExpressions) . ')'; |
|
1262 | + $sql .= implode(', ', $scalarExpressions).')'; |
|
1263 | 1263 | |
1264 | 1264 | return $sql; |
1265 | 1265 | } |
@@ -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 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
@@ -1396,11 +1396,11 @@ discard block |
||
1396 | 1396 | $columnAlias = $this->getSQLColumnAlias(); |
1397 | 1397 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1398 | 1398 | |
1399 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1399 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1400 | 1400 | |
1401 | 1401 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1402 | 1402 | |
1403 | - if (! $hidden) { |
|
1403 | + if ( ! $hidden) { |
|
1404 | 1404 | // We cannot resolve field type here; assume 'string'. |
1405 | 1405 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1406 | 1406 | } |
@@ -1424,7 +1424,7 @@ discard block |
||
1424 | 1424 | $class = $queryComp['metadata']; |
1425 | 1425 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1426 | 1426 | |
1427 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1427 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1428 | 1428 | $this->selectedClasses[$dqlAlias] = [ |
1429 | 1429 | 'class' => $class, |
1430 | 1430 | 'dqlAlias' => $dqlAlias, |
@@ -1436,7 +1436,7 @@ discard block |
||
1436 | 1436 | |
1437 | 1437 | // Select all fields from the queried class |
1438 | 1438 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1439 | - if (! ($property instanceof FieldMetadata)) { |
|
1439 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1440 | 1440 | continue; |
1441 | 1441 | } |
1442 | 1442 | |
@@ -1471,7 +1471,7 @@ discard block |
||
1471 | 1471 | $subClass = $this->em->getClassMetadata($subClassName); |
1472 | 1472 | |
1473 | 1473 | foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1474 | - if (! ($property instanceof FieldMetadata)) { |
|
1474 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1475 | 1475 | continue; |
1476 | 1476 | } |
1477 | 1477 | |
@@ -1510,7 +1510,7 @@ discard block |
||
1510 | 1510 | */ |
1511 | 1511 | public function walkQuantifiedExpression($qExpr) |
1512 | 1512 | { |
1513 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1513 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1514 | 1514 | } |
1515 | 1515 | |
1516 | 1516 | /** |
@@ -1550,7 +1550,7 @@ discard block |
||
1550 | 1550 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1551 | 1551 | } |
1552 | 1552 | |
1553 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1553 | + return ' FROM '.implode(', ', $sqlParts); |
|
1554 | 1554 | } |
1555 | 1555 | |
1556 | 1556 | /** |
@@ -1558,7 +1558,7 @@ discard block |
||
1558 | 1558 | */ |
1559 | 1559 | public function walkSimpleSelectClause($simpleSelectClause) |
1560 | 1560 | { |
1561 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1561 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1562 | 1562 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1563 | 1563 | } |
1564 | 1564 | |
@@ -1591,7 +1591,7 @@ discard block |
||
1591 | 1591 | break; |
1592 | 1592 | |
1593 | 1593 | case ($e instanceof AST\Subselect): |
1594 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1594 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1595 | 1595 | break; |
1596 | 1596 | |
1597 | 1597 | case ($e instanceof AST\PathExpression): |
@@ -1600,7 +1600,7 @@ discard block |
||
1600 | 1600 | $class = $qComp['metadata']; |
1601 | 1601 | $fieldType = $class->getProperty($e->field)->getType(); |
1602 | 1602 | |
1603 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1603 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1604 | 1604 | break; |
1605 | 1605 | |
1606 | 1606 | case ($e instanceof AST\Literal): |
@@ -1614,11 +1614,11 @@ discard block |
||
1614 | 1614 | break; |
1615 | 1615 | } |
1616 | 1616 | |
1617 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1617 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1618 | 1618 | break; |
1619 | 1619 | |
1620 | 1620 | default: |
1621 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1621 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1622 | 1622 | break; |
1623 | 1623 | } |
1624 | 1624 | |
@@ -1651,10 +1651,10 @@ discard block |
||
1651 | 1651 | case ($expr instanceof AST\Subselect): |
1652 | 1652 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1653 | 1653 | |
1654 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1654 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1655 | 1655 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1656 | 1656 | |
1657 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1657 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1658 | 1658 | break; |
1659 | 1659 | |
1660 | 1660 | case ($expr instanceof AST\Functions\FunctionNode): |
@@ -1671,7 +1671,7 @@ discard block |
||
1671 | 1671 | $columnAlias = $this->getSQLColumnAlias(); |
1672 | 1672 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1673 | 1673 | |
1674 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1674 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1675 | 1675 | break; |
1676 | 1676 | |
1677 | 1677 | case ($expr instanceof AST\ParenthesisExpression): |
@@ -1691,8 +1691,8 @@ discard block |
||
1691 | 1691 | */ |
1692 | 1692 | public function walkAggregateExpression($aggExpression) |
1693 | 1693 | { |
1694 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1695 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1694 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1695 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1696 | 1696 | } |
1697 | 1697 | |
1698 | 1698 | /** |
@@ -1706,7 +1706,7 @@ discard block |
||
1706 | 1706 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1707 | 1707 | } |
1708 | 1708 | |
1709 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1709 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1710 | 1710 | } |
1711 | 1711 | |
1712 | 1712 | /** |
@@ -1715,7 +1715,7 @@ discard block |
||
1715 | 1715 | public function walkGroupByItem($groupByItem) |
1716 | 1716 | { |
1717 | 1717 | // StateFieldPathExpression |
1718 | - if (! is_string($groupByItem)) { |
|
1718 | + if ( ! is_string($groupByItem)) { |
|
1719 | 1719 | return $this->walkPathExpression($groupByItem); |
1720 | 1720 | } |
1721 | 1721 | |
@@ -1769,7 +1769,7 @@ discard block |
||
1769 | 1769 | { |
1770 | 1770 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1771 | 1771 | $tableName = $class->getTableName(); |
1772 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1772 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1773 | 1773 | |
1774 | 1774 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1775 | 1775 | |
@@ -1785,12 +1785,12 @@ discard block |
||
1785 | 1785 | { |
1786 | 1786 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1787 | 1787 | $tableName = $class->getTableName(); |
1788 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1788 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1789 | 1789 | |
1790 | 1790 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1791 | 1791 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1792 | 1792 | |
1793 | - $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1793 | + $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1794 | 1794 | |
1795 | 1795 | return $sql; |
1796 | 1796 | } |
@@ -1803,7 +1803,7 @@ discard block |
||
1803 | 1803 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1804 | 1804 | $this->useSqlTableAliases = false; |
1805 | 1805 | |
1806 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1806 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1807 | 1807 | $newValue = $updateItem->newValue; |
1808 | 1808 | |
1809 | 1809 | switch (true) { |
@@ -1847,7 +1847,7 @@ discard block |
||
1847 | 1847 | |
1848 | 1848 | if ($filterClauses) { |
1849 | 1849 | if ($condSql) { |
1850 | - $condSql = '(' . $condSql . ') AND '; |
|
1850 | + $condSql = '('.$condSql.') AND '; |
|
1851 | 1851 | } |
1852 | 1852 | |
1853 | 1853 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1855,11 +1855,11 @@ discard block |
||
1855 | 1855 | } |
1856 | 1856 | |
1857 | 1857 | if ($condSql) { |
1858 | - return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1858 | + return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1859 | 1859 | } |
1860 | 1860 | |
1861 | 1861 | if ($discrSql) { |
1862 | - return ' WHERE ' . $discrSql; |
|
1862 | + return ' WHERE '.$discrSql; |
|
1863 | 1863 | } |
1864 | 1864 | |
1865 | 1865 | return ''; |
@@ -1872,7 +1872,7 @@ discard block |
||
1872 | 1872 | { |
1873 | 1873 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1874 | 1874 | // if only one ConditionalTerm is defined |
1875 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1875 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1876 | 1876 | return $this->walkConditionalTerm($condExpr); |
1877 | 1877 | } |
1878 | 1878 | |
@@ -1886,7 +1886,7 @@ discard block |
||
1886 | 1886 | { |
1887 | 1887 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1888 | 1888 | // if only one ConditionalFactor is defined |
1889 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1889 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1890 | 1890 | return $this->walkConditionalFactor($condTerm); |
1891 | 1891 | } |
1892 | 1892 | |
@@ -1902,7 +1902,7 @@ discard block |
||
1902 | 1902 | // if only one ConditionalPrimary is defined |
1903 | 1903 | return ( ! ($factor instanceof AST\ConditionalFactor)) |
1904 | 1904 | ? $this->walkConditionalPrimary($factor) |
1905 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1905 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1906 | 1906 | } |
1907 | 1907 | |
1908 | 1908 | /** |
@@ -1917,7 +1917,7 @@ discard block |
||
1917 | 1917 | if ($primary->isConditionalExpression()) { |
1918 | 1918 | $condExpr = $primary->conditionalExpression; |
1919 | 1919 | |
1920 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1920 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1921 | 1921 | } |
1922 | 1922 | } |
1923 | 1923 | |
@@ -1928,7 +1928,7 @@ discard block |
||
1928 | 1928 | { |
1929 | 1929 | $sql = ($existsExpr->not) ? 'NOT ' : ''; |
1930 | 1930 | |
1931 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1931 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1932 | 1932 | |
1933 | 1933 | return $sql; |
1934 | 1934 | } |
@@ -1977,7 +1977,7 @@ discard block |
||
1977 | 1977 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1978 | 1978 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1979 | 1979 | |
1980 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
1980 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
1981 | 1981 | |
1982 | 1982 | $sqlParts = []; |
1983 | 1983 | |
@@ -1998,7 +1998,7 @@ discard block |
||
1998 | 1998 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
1999 | 1999 | } |
2000 | 2000 | |
2001 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2001 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2002 | 2002 | } |
2003 | 2003 | |
2004 | 2004 | $sql .= implode(' AND ', $sqlParts); |
@@ -2012,7 +2012,7 @@ discard block |
||
2012 | 2012 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2013 | 2013 | |
2014 | 2014 | // join to target table |
2015 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2015 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2016 | 2016 | |
2017 | 2017 | // join conditions |
2018 | 2018 | $joinSqlParts = []; |
@@ -2063,13 +2063,13 @@ discard block |
||
2063 | 2063 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2064 | 2064 | } |
2065 | 2065 | |
2066 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2066 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2067 | 2067 | } |
2068 | 2068 | |
2069 | 2069 | $sql .= implode(' AND ', $sqlParts); |
2070 | 2070 | } |
2071 | 2071 | |
2072 | - return $sql . ')'; |
|
2072 | + return $sql.')'; |
|
2073 | 2073 | } |
2074 | 2074 | |
2075 | 2075 | /** |
@@ -2080,7 +2080,7 @@ discard block |
||
2080 | 2080 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2081 | 2081 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2082 | 2082 | |
2083 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2083 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2084 | 2084 | } |
2085 | 2085 | |
2086 | 2086 | /** |
@@ -2089,19 +2089,19 @@ discard block |
||
2089 | 2089 | public function walkNullComparisonExpression($nullCompExpr) |
2090 | 2090 | { |
2091 | 2091 | $expression = $nullCompExpr->expression; |
2092 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2092 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2093 | 2093 | |
2094 | 2094 | // Handle ResultVariable |
2095 | 2095 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2096 | - return $this->walkResultVariable($expression) . $comparison; |
|
2096 | + return $this->walkResultVariable($expression).$comparison; |
|
2097 | 2097 | } |
2098 | 2098 | |
2099 | 2099 | // Handle InputParameter mapping inclusion to ParserResult |
2100 | 2100 | if ($expression instanceof AST\InputParameter) { |
2101 | - return $this->walkInputParameter($expression) . $comparison; |
|
2101 | + return $this->walkInputParameter($expression).$comparison; |
|
2102 | 2102 | } |
2103 | 2103 | |
2104 | - return $expression->dispatch($this) . $comparison; |
|
2104 | + return $expression->dispatch($this).$comparison; |
|
2105 | 2105 | } |
2106 | 2106 | |
2107 | 2107 | /** |
@@ -2109,7 +2109,7 @@ discard block |
||
2109 | 2109 | */ |
2110 | 2110 | public function walkInExpression($inExpr) |
2111 | 2111 | { |
2112 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2112 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2113 | 2113 | |
2114 | 2114 | $sql .= ($inExpr->subselect) |
2115 | 2115 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2133,12 +2133,12 @@ discard block |
||
2133 | 2133 | $discrColumnType = $discrColumn->getType(); |
2134 | 2134 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2135 | 2135 | $sqlTableAlias = $this->useSqlTableAliases |
2136 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2136 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2137 | 2137 | : ''; |
2138 | 2138 | |
2139 | 2139 | return sprintf( |
2140 | 2140 | '%s %sIN %s', |
2141 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2141 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2142 | 2142 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2143 | 2143 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2144 | 2144 | ); |
@@ -2185,8 +2185,8 @@ discard block |
||
2185 | 2185 | $sql .= ' NOT'; |
2186 | 2186 | } |
2187 | 2187 | |
2188 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2189 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2188 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2189 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2190 | 2190 | |
2191 | 2191 | return $sql; |
2192 | 2192 | } |
@@ -2201,7 +2201,7 @@ discard block |
||
2201 | 2201 | ? $this->walkResultVariable($stringExpr) |
2202 | 2202 | : $stringExpr->dispatch($this); |
2203 | 2203 | |
2204 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2204 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2205 | 2205 | |
2206 | 2206 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2207 | 2207 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2214,7 +2214,7 @@ discard block |
||
2214 | 2214 | } |
2215 | 2215 | |
2216 | 2216 | if ($likeExpr->escapeChar) { |
2217 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2217 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2218 | 2218 | } |
2219 | 2219 | |
2220 | 2220 | return $sql; |
@@ -2241,7 +2241,7 @@ discard block |
||
2241 | 2241 | ? $leftExpr->dispatch($this) |
2242 | 2242 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2243 | 2243 | |
2244 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2244 | + $sql .= ' '.$compExpr->operator.' '; |
|
2245 | 2245 | |
2246 | 2246 | $sql .= ($rightExpr instanceof AST\Node) |
2247 | 2247 | ? $rightExpr->dispatch($this) |
@@ -2277,7 +2277,7 @@ discard block |
||
2277 | 2277 | { |
2278 | 2278 | return ($arithmeticExpr->isSimpleArithmeticExpression()) |
2279 | 2279 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2280 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2280 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2281 | 2281 | } |
2282 | 2282 | |
2283 | 2283 | /** |
@@ -2285,7 +2285,7 @@ discard block |
||
2285 | 2285 | */ |
2286 | 2286 | public function walkSimpleArithmeticExpression($simpleArithmeticExpr) |
2287 | 2287 | { |
2288 | - if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2288 | + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2289 | 2289 | return $this->walkArithmeticTerm($simpleArithmeticExpr); |
2290 | 2290 | } |
2291 | 2291 | |
@@ -2305,7 +2305,7 @@ discard block |
||
2305 | 2305 | |
2306 | 2306 | // Phase 2 AST optimization: Skip processing of ArithmeticTerm |
2307 | 2307 | // if only one ArithmeticFactor is defined |
2308 | - if (! ($term instanceof AST\ArithmeticTerm)) { |
|
2308 | + if ( ! ($term instanceof AST\ArithmeticTerm)) { |
|
2309 | 2309 | return $this->walkArithmeticFactor($term); |
2310 | 2310 | } |
2311 | 2311 | |
@@ -2325,13 +2325,13 @@ discard block |
||
2325 | 2325 | |
2326 | 2326 | // Phase 2 AST optimization: Skip processing of ArithmeticFactor |
2327 | 2327 | // if only one ArithmeticPrimary is defined |
2328 | - if (! ($factor instanceof AST\ArithmeticFactor)) { |
|
2328 | + if ( ! ($factor instanceof AST\ArithmeticFactor)) { |
|
2329 | 2329 | return $this->walkArithmeticPrimary($factor); |
2330 | 2330 | } |
2331 | 2331 | |
2332 | 2332 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2333 | 2333 | |
2334 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2334 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2335 | 2335 | } |
2336 | 2336 | |
2337 | 2337 | /** |
@@ -2344,7 +2344,7 @@ discard block |
||
2344 | 2344 | public function walkArithmeticPrimary($primary) |
2345 | 2345 | { |
2346 | 2346 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2347 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2347 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2348 | 2348 | } |
2349 | 2349 | |
2350 | 2350 | if ($primary instanceof AST\Node) { |
@@ -2403,7 +2403,7 @@ discard block |
||
2403 | 2403 | $entityClassName = $entityClass->getClassName(); |
2404 | 2404 | |
2405 | 2405 | if ($entityClassName !== $rootClass->getClassName()) { |
2406 | - if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2406 | + if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2407 | 2407 | throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName()); |
2408 | 2408 | } |
2409 | 2409 | } |
@@ -2415,6 +2415,6 @@ discard block |
||
2415 | 2415 | $sqlParameterList[] = $this->conn->quote($discriminator); |
2416 | 2416 | } |
2417 | 2417 | |
2418 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2418 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2419 | 2419 | } |
2420 | 2420 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query; |
6 | 6 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $classMetadata = $this->em->getClassMetadata($class); |
129 | 129 | $platform = $this->em->getConnection()->getDatabasePlatform(); |
130 | 130 | |
131 | - if (! $this->isInheritanceSupported($classMetadata)) { |
|
131 | + if ( ! $this->isInheritanceSupported($classMetadata)) { |
|
132 | 132 | throw new \InvalidArgumentException( |
133 | 133 | 'ResultSetMapping builder does not currently support your inheritance scheme.' |
134 | 134 | ); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | ); |
169 | 169 | } |
170 | 170 | |
171 | - if (! $joinColumn->getType()) { |
|
171 | + if ( ! $joinColumn->getType()) { |
|
172 | 172 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
173 | 173 | } |
174 | 174 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | { |
208 | 208 | switch ($mode) { |
209 | 209 | case self::COLUMN_RENAMING_INCREMENT: |
210 | - return $columnName . $this->sqlCounter++; |
|
210 | + return $columnName.$this->sqlCounter++; |
|
211 | 211 | |
212 | 212 | case self::COLUMN_RENAMING_CUSTOM: |
213 | 213 | return $customRenameColumns[$columnName] ?? $columnName; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | { |
253 | 253 | $counter = 0; |
254 | 254 | $resultMapping = $class->getSqlResultSetMapping($resultSetMappingName); |
255 | - $rootAlias = 'e' . $counter; |
|
255 | + $rootAlias = 'e'.$counter; |
|
256 | 256 | |
257 | 257 | if (isset($resultMapping['entities'])) { |
258 | 258 | foreach ($resultMapping['entities'] as $key => $entityMapping) { |
@@ -267,12 +267,12 @@ discard block |
||
267 | 267 | $this->addEntityResult($classMetadata->getClassName(), $rootAlias); |
268 | 268 | $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $rootAlias); |
269 | 269 | } else { |
270 | - $joinAlias = 'e' . ++$counter; |
|
270 | + $joinAlias = 'e'.++$counter; |
|
271 | 271 | |
272 | 272 | $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $joinAlias); |
273 | 273 | |
274 | 274 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $association) { |
275 | - if (! ($association instanceof AssociationMetadata)) { |
|
275 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
276 | 276 | continue; |
277 | 277 | } |
278 | 278 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | |
333 | 333 | $property = $classMetadata->getProperty($fieldName); |
334 | 334 | |
335 | - if (! $relation && $property instanceof FieldMetadata) { |
|
335 | + if ( ! $relation && $property instanceof FieldMetadata) { |
|
336 | 336 | $this->addFieldResult($alias, $field['column'], $fieldName, $classMetadata->getClassName()); |
337 | 337 | |
338 | 338 | continue; |
@@ -340,20 +340,20 @@ discard block |
||
340 | 340 | |
341 | 341 | $property = $classMetadata->getProperty($relation); |
342 | 342 | |
343 | - if (! $property) { |
|
343 | + if ( ! $property) { |
|
344 | 344 | throw new \InvalidArgumentException( |
345 | - "Entity '" . $classMetadata->getClassName() . "' has no field '" . $relation . "'. " |
|
345 | + "Entity '".$classMetadata->getClassName()."' has no field '".$relation."'. " |
|
346 | 346 | ); |
347 | 347 | } |
348 | 348 | |
349 | 349 | if ($property instanceof AssociationMetadata) { |
350 | - if (! $relation) { |
|
350 | + if ( ! $relation) { |
|
351 | 351 | $this->addFieldResult($alias, $field['column'], $fieldName, $classMetadata->getClassName()); |
352 | 352 | |
353 | 353 | continue; |
354 | 354 | } |
355 | 355 | |
356 | - $joinAlias = $alias . $relation; |
|
356 | + $joinAlias = $alias.$relation; |
|
357 | 357 | $parentAlias = $alias; |
358 | 358 | |
359 | 359 | $this->addJoinedEntityResult($property->getTargetEntity(), $joinAlias, $parentAlias, $relation); |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | ); |
392 | 392 | } |
393 | 393 | |
394 | - if (! $joinColumn->getType()) { |
|
394 | + if ( ! $joinColumn->getType()) { |
|
395 | 395 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
396 | 396 | } |
397 | 397 | |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | $sql .= ', '; |
427 | 427 | } |
428 | 428 | |
429 | - $sql .= $tableAlias . '.'; |
|
429 | + $sql .= $tableAlias.'.'; |
|
430 | 430 | |
431 | 431 | if (isset($this->fieldMappings[$columnName])) { |
432 | 432 | $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]); |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | $sql .= $this->discriminatorColumns[$dqlAlias]; |
439 | 439 | } |
440 | 440 | |
441 | - $sql .= ' AS ' . $columnName; |
|
441 | + $sql .= ' AS '.$columnName; |
|
442 | 442 | } |
443 | 443 | |
444 | 444 | return $sql; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | foreach ($props as $name => $prop) { |
52 | 52 | $ident += 4; |
53 | 53 | $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
54 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
54 | + . $this->dump($prop) . ',' . PHP_EOL; |
|
55 | 55 | $ident -= 4; |
56 | 56 | } |
57 | 57 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | foreach ($obj as $k => $v) { |
65 | 65 | $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
66 | - . $k . '" => ' . $this->dump($v) . ','; |
|
66 | + . $k . '" => ' . $this->dump($v) . ','; |
|
67 | 67 | $some = true; |
68 | 68 | } |
69 | 69 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query\AST; |
6 | 6 | |
@@ -45,32 +45,32 @@ discard block |
||
45 | 45 | $str = ''; |
46 | 46 | |
47 | 47 | if ($obj instanceof Node) { |
48 | - $str .= get_class($obj) . '(' . PHP_EOL; |
|
48 | + $str .= get_class($obj).'('.PHP_EOL; |
|
49 | 49 | $props = get_object_vars($obj); |
50 | 50 | |
51 | 51 | foreach ($props as $name => $prop) { |
52 | 52 | $ident += 4; |
53 | - $str .= str_repeat(' ', $ident) . '"' . $name . '": ' |
|
54 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
53 | + $str .= str_repeat(' ', $ident).'"'.$name.'": ' |
|
54 | + . $this->dump($prop).','.PHP_EOL; |
|
55 | 55 | $ident -= 4; |
56 | 56 | } |
57 | 57 | |
58 | - $str .= str_repeat(' ', $ident) . ')'; |
|
58 | + $str .= str_repeat(' ', $ident).')'; |
|
59 | 59 | } elseif (is_array($obj)) { |
60 | 60 | $ident += 4; |
61 | 61 | $str .= 'array('; |
62 | 62 | $some = false; |
63 | 63 | |
64 | 64 | foreach ($obj as $k => $v) { |
65 | - $str .= PHP_EOL . str_repeat(' ', $ident) . '"' |
|
66 | - . $k . '" => ' . $this->dump($v) . ','; |
|
65 | + $str .= PHP_EOL.str_repeat(' ', $ident).'"' |
|
66 | + . $k.'" => '.$this->dump($v).','; |
|
67 | 67 | $some = true; |
68 | 68 | } |
69 | 69 | |
70 | 70 | $ident -= 4; |
71 | - $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')'; |
|
71 | + $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '').')'; |
|
72 | 72 | } elseif (is_object($obj)) { |
73 | - $str .= 'instanceof(' . get_class($obj) . ')'; |
|
73 | + $str .= 'instanceof('.get_class($obj).')'; |
|
74 | 74 | } else { |
75 | 75 | $str .= var_export($obj, true); |
76 | 76 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query\AST; |
6 | 6 | |
@@ -18,6 +18,6 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public static function noDispatchForNode($node) |
20 | 20 | { |
21 | - return new self('Double-dispatch for node ' . get_class($node) . ' is not supported.'); |
|
21 | + return new self('Double-dispatch for node '.get_class($node).' is not supported.'); |
|
22 | 22 | } |
23 | 23 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query\AST\Functions; |
6 | 6 | |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function getSql(SqlWalker $sqlWalker) |
26 | 26 | { |
27 | - return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression( |
|
27 | + return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression( |
|
28 | 28 | $this->simpleArithmeticExpression |
29 | - ) . ')'; |
|
29 | + ).')'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query\AST\Functions; |
6 | 6 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->getTableName()); |
45 | 45 | $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias); |
46 | 46 | |
47 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
47 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
48 | 48 | |
49 | 49 | $owningAssociation = $targetClass->getProperty($association->getMappedBy()); |
50 | 50 | $first = true; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | // join to target table |
81 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' WHERE '; |
|
81 | + $sql .= $joinTableName.' '.$joinTableAlias.' WHERE '; |
|
82 | 82 | |
83 | 83 | $joinColumns = $association->isOwningSide() |
84 | 84 | ? $joinTable->getJoinColumns() |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | } |
105 | 105 | } |
106 | 106 | |
107 | - return '(' . $sql . ')'; |
|
107 | + return '('.$sql.')'; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query; |
6 | 6 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $found = false; |
221 | 221 | |
222 | 222 | foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) { |
223 | - if (! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) { |
|
223 | + if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) { |
|
224 | 224 | continue; |
225 | 225 | } |
226 | 226 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | // field name => class name of declaring class |
330 | 330 | $this->declaringClasses[$columnName] = $declaringClass ?: $this->aliasMap[$alias]; |
331 | 331 | |
332 | - if (! $this->isMixed && $this->scalarMappings) { |
|
332 | + if ( ! $this->isMixed && $this->scalarMappings) { |
|
333 | 333 | $this->isMixed = true; |
334 | 334 | } |
335 | 335 | |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | $this->scalarMappings[$columnName] = $alias; |
375 | 375 | $this->typeMappings[$columnName] = $type; |
376 | 376 | |
377 | - if (! $this->isMixed && $this->fieldMappings) { |
|
377 | + if ( ! $this->isMixed && $this->fieldMappings) { |
|
378 | 378 | $this->isMixed = true; |
379 | 379 | } |
380 | 380 |