@@ -274,10 +274,10 @@ discard block |
||
274 | 274 | */ |
275 | 275 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
276 | 276 | { |
277 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
277 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
278 | 278 | |
279 | - if (! isset($this->tableAliasMap[$tableName])) { |
|
280 | - $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++; |
|
279 | + if ( ! isset($this->tableAliasMap[$tableName])) { |
|
280 | + $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++; |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | return $this->tableAliasMap[$tableName]; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | */ |
296 | 296 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
297 | 297 | { |
298 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
298 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
299 | 299 | |
300 | 300 | $this->tableAliasMap[$tableName] = $alias; |
301 | 301 | |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | */ |
310 | 310 | public function getSQLColumnAlias() |
311 | 311 | { |
312 | - return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++); |
|
312 | + return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | /** |
@@ -336,14 +336,14 @@ discard block |
||
336 | 336 | |
337 | 337 | // If this is a joined association we must use left joins to preserve the correct result. |
338 | 338 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
339 | - $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
339 | + $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
340 | 340 | |
341 | 341 | $sqlParts = []; |
342 | 342 | |
343 | 343 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
344 | 344 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
345 | 345 | |
346 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
346 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias); |
@@ -367,14 +367,14 @@ discard block |
||
367 | 367 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
368 | 368 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
369 | 369 | |
370 | - $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
370 | + $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
371 | 371 | |
372 | 372 | $sqlParts = []; |
373 | 373 | |
374 | 374 | foreach ($subClass->getIdentifierColumns($this->em) as $column) { |
375 | 375 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
376 | 376 | |
377 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
377 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
378 | 378 | } |
379 | 379 | |
380 | 380 | $sql .= implode(' AND ', $sqlParts); |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | $qComp = $this->queryComponents[$dqlAlias]; |
396 | 396 | $association = $qComp['relation']; |
397 | 397 | |
398 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
398 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
399 | 399 | continue; |
400 | 400 | } |
401 | 401 | |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | $property = $qComp['metadata']->getProperty($fieldName); |
404 | 404 | $tableName = $property->getTableName(); |
405 | 405 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
406 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
406 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
407 | 407 | |
408 | 408 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
409 | 409 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | } |
412 | 412 | |
413 | 413 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
414 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
414 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
415 | 415 | } |
416 | 416 | } |
417 | 417 | |
@@ -451,19 +451,19 @@ discard block |
||
451 | 451 | $discrColumnType = $discrColumn->getType(); |
452 | 452 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
453 | 453 | $sqlTableAlias = ($this->useSqlTableAliases) |
454 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
454 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
455 | 455 | : ''; |
456 | 456 | |
457 | 457 | $sqlParts[] = sprintf( |
458 | 458 | '%s IN (%s)', |
459 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
459 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
460 | 460 | implode(', ', $values) |
461 | 461 | ); |
462 | 462 | } |
463 | 463 | |
464 | 464 | $sql = implode(' AND ', $sqlParts); |
465 | 465 | |
466 | - return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql; |
|
466 | + return isset($sqlParts[1]) ? '('.$sql.')' : $sql; |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | /** |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | */ |
477 | 477 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
478 | 478 | { |
479 | - if (! $this->em->hasFilters()) { |
|
479 | + if ( ! $this->em->hasFilters()) { |
|
480 | 480 | return ''; |
481 | 481 | } |
482 | 482 | |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | continue; |
513 | 513 | } |
514 | 514 | |
515 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
515 | + $filterClauses[] = '('.$filterExpr.')'; |
|
516 | 516 | } |
517 | 517 | |
518 | 518 | return implode(' AND ', $filterClauses); |
@@ -542,11 +542,11 @@ discard block |
||
542 | 542 | $sql .= $this->walkOrderByClause($AST->orderByClause); |
543 | 543 | } |
544 | 544 | |
545 | - if (! $AST->orderByClause) { |
|
545 | + if ( ! $AST->orderByClause) { |
|
546 | 546 | $orderBySql = $this->generateOrderedCollectionOrderByItems(); |
547 | 547 | |
548 | 548 | if ($orderBySql) { |
549 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
549 | + $sql .= ' ORDER BY '.$orderBySql; |
|
550 | 550 | } |
551 | 551 | } |
552 | 552 | |
@@ -559,11 +559,11 @@ discard block |
||
559 | 559 | } |
560 | 560 | |
561 | 561 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
562 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
562 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
563 | 563 | } |
564 | 564 | |
565 | 565 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
566 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
566 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
567 | 567 | } |
568 | 568 | |
569 | 569 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | } |
572 | 572 | |
573 | 573 | foreach ($this->selectedClasses as $selectedClass) { |
574 | - if (! $selectedClass['class']->isVersioned()) { |
|
574 | + if ( ! $selectedClass['class']->isVersioned()) { |
|
575 | 575 | throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName()); |
576 | 576 | } |
577 | 577 | } |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
621 | 621 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
622 | 622 | |
623 | - $sqlParts[] = $tableAlias . '.' . $quotedColumnName; |
|
623 | + $sqlParts[] = $tableAlias.'.'.$quotedColumnName; |
|
624 | 624 | } |
625 | 625 | |
626 | 626 | return implode(', ', $sqlParts); |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | { |
639 | 639 | $class = $this->queryComponents[$identificationVariable]['metadata']; |
640 | 640 | |
641 | - if (! $fieldName) { |
|
641 | + if ( ! $fieldName) { |
|
642 | 642 | return $this->getSQLTableAlias($class->getTableName(), $identificationVariable); |
643 | 643 | } |
644 | 644 | |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | $property = $class->getProperty($fieldName); |
668 | 668 | |
669 | 669 | if ($this->useSqlTableAliases) { |
670 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
670 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
671 | 671 | } |
672 | 672 | |
673 | 673 | $sql .= $this->platform->quoteIdentifier($property->getColumnName()); |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
682 | 682 | $association = $class->getProperty($fieldName); |
683 | 683 | |
684 | - if (! $association->isOwningSide()) { |
|
684 | + if ( ! $association->isOwningSide()) { |
|
685 | 685 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
686 | 686 | } |
687 | 687 | |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | $joinColumn = reset($joinColumns); |
696 | 696 | |
697 | 697 | if ($this->useSqlTableAliases) { |
698 | - $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.'; |
|
698 | + $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.'; |
|
699 | 699 | } |
700 | 700 | |
701 | 701 | $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | */ |
714 | 714 | public function walkSelectClause($selectClause) |
715 | 715 | { |
716 | - $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
716 | + $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
717 | 717 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
718 | 718 | |
719 | 719 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) { |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | |
757 | 757 | $sqlSelectExpressions[] = sprintf( |
758 | 758 | '%s AS %s', |
759 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform), |
|
759 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform), |
|
760 | 760 | $sqlColumnAlias |
761 | 761 | ); |
762 | 762 | |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | |
767 | 767 | // Add foreign key columns of class and also parent classes |
768 | 768 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
769 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
769 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
770 | 770 | || ( ! $addMetaColumns && ! $association->isPrimaryKey())) { |
771 | 771 | continue; |
772 | 772 | } |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | $columnAlias = $this->getSQLColumnAlias(); |
782 | 782 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
783 | 783 | |
784 | - if (! $joinColumn->getType()) { |
|
784 | + if ( ! $joinColumn->getType()) { |
|
785 | 785 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
786 | 786 | } |
787 | 787 | |
@@ -797,7 +797,7 @@ discard block |
||
797 | 797 | } |
798 | 798 | |
799 | 799 | // Add foreign key columns to SQL, if necessary |
800 | - if (! $addMetaColumns) { |
|
800 | + if ( ! $addMetaColumns) { |
|
801 | 801 | continue; |
802 | 802 | } |
803 | 803 | |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | continue; |
812 | 812 | } |
813 | 813 | |
814 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
814 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
815 | 815 | continue; |
816 | 816 | } |
817 | 817 | |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | $columnAlias = $this->getSQLColumnAlias(); |
826 | 826 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
827 | 827 | |
828 | - if (! $joinColumn->getType()) { |
|
828 | + if ( ! $joinColumn->getType()) { |
|
829 | 829 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
830 | 830 | } |
831 | 831 | |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
860 | 860 | } |
861 | 861 | |
862 | - return ' FROM ' . implode(', ', $sqlParts); |
|
862 | + return ' FROM '.implode(', ', $sqlParts); |
|
863 | 863 | } |
864 | 864 | |
865 | 865 | /** |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
935 | 935 | |
936 | 936 | $sql = $this->platform->appendLockHint( |
937 | - $tableName . ' ' . $tableAlias, |
|
937 | + $tableName.' '.$tableAlias, |
|
938 | 938 | $this->query->getHint(Query::HINT_LOCK_MODE) |
939 | 939 | ); |
940 | 940 | |
@@ -944,11 +944,11 @@ discard block |
||
944 | 944 | |
945 | 945 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
946 | 946 | |
947 | - if (! $buildNestedJoins) { |
|
948 | - return $sql . $classTableInheritanceJoins; |
|
947 | + if ( ! $buildNestedJoins) { |
|
948 | + return $sql.$classTableInheritanceJoins; |
|
949 | 949 | } |
950 | 950 | |
951 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
951 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
952 | 952 | } |
953 | 953 | |
954 | 954 | /** |
@@ -985,7 +985,7 @@ discard block |
||
985 | 985 | ; |
986 | 986 | |
987 | 987 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
988 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
988 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
989 | 989 | if ($association instanceof ToManyAssociationMetadata) { |
990 | 990 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
991 | 991 | } |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | } |
1040 | 1040 | |
1041 | 1041 | $targetTableJoin = [ |
1042 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1042 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1043 | 1043 | 'condition' => implode(' AND ', $conditions), |
1044 | 1044 | ]; |
1045 | 1045 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1067,7 +1067,7 @@ discard block |
||
1067 | 1067 | ); |
1068 | 1068 | } |
1069 | 1069 | |
1070 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1070 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1071 | 1071 | |
1072 | 1072 | // Join target table |
1073 | 1073 | $sql .= ($joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1106,7 +1106,7 @@ discard block |
||
1106 | 1106 | } |
1107 | 1107 | |
1108 | 1108 | $targetTableJoin = [ |
1109 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1109 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1110 | 1110 | 'condition' => implode(' AND ', $conditions), |
1111 | 1111 | ]; |
1112 | 1112 | } else { |
@@ -1114,23 +1114,23 @@ discard block |
||
1114 | 1114 | } |
1115 | 1115 | |
1116 | 1116 | // Handle WITH clause |
1117 | - $withCondition = ($condExpr === null) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1117 | + $withCondition = ($condExpr === null) ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1118 | 1118 | |
1119 | 1119 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1120 | 1120 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1121 | 1121 | |
1122 | 1122 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1123 | 1123 | if ($withCondition) { |
1124 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1124 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1125 | 1125 | } else { |
1126 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1126 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1127 | 1127 | } |
1128 | 1128 | } else { |
1129 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1129 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1130 | 1130 | } |
1131 | 1131 | |
1132 | 1132 | if ($withCondition) { |
1133 | - $sql .= ' AND ' . $withCondition; |
|
1133 | + $sql .= ' AND '.$withCondition; |
|
1134 | 1134 | } |
1135 | 1135 | |
1136 | 1136 | // Apply the indexes |
@@ -1164,7 +1164,7 @@ discard block |
||
1164 | 1164 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1165 | 1165 | } |
1166 | 1166 | |
1167 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1167 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1168 | 1168 | } |
1169 | 1169 | |
1170 | 1170 | /** |
@@ -1181,10 +1181,10 @@ discard block |
||
1181 | 1181 | $this->orderedColumnsMap[$sql] = $type; |
1182 | 1182 | |
1183 | 1183 | if ($expr instanceof AST\Subselect) { |
1184 | - return '(' . $sql . ') ' . $type; |
|
1184 | + return '('.$sql.') '.$type; |
|
1185 | 1185 | } |
1186 | 1186 | |
1187 | - return $sql . ' ' . $type; |
|
1187 | + return $sql.' '.$type; |
|
1188 | 1188 | } |
1189 | 1189 | |
1190 | 1190 | /** |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | */ |
1193 | 1193 | public function walkHavingClause($havingClause) |
1194 | 1194 | { |
1195 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1195 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1196 | 1196 | } |
1197 | 1197 | |
1198 | 1198 | /** |
@@ -1215,7 +1215,7 @@ discard block |
||
1215 | 1215 | $conditions = []; |
1216 | 1216 | |
1217 | 1217 | if ($join->conditionalExpression) { |
1218 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1218 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1219 | 1219 | } |
1220 | 1220 | |
1221 | 1221 | $isUnconditionalJoin = empty($conditions); |
@@ -1240,7 +1240,7 @@ discard block |
||
1240 | 1240 | } |
1241 | 1241 | |
1242 | 1242 | if ($conditions) { |
1243 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1243 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1244 | 1244 | } |
1245 | 1245 | |
1246 | 1246 | break; |
@@ -1270,7 +1270,7 @@ discard block |
||
1270 | 1270 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1271 | 1271 | } |
1272 | 1272 | |
1273 | - $sql .= implode(', ', $scalarExpressions) . ')'; |
|
1273 | + $sql .= implode(', ', $scalarExpressions).')'; |
|
1274 | 1274 | |
1275 | 1275 | return $sql; |
1276 | 1276 | } |
@@ -1292,7 +1292,7 @@ discard block |
||
1292 | 1292 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1293 | 1293 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1294 | 1294 | |
1295 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1295 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1296 | 1296 | } |
1297 | 1297 | |
1298 | 1298 | /** |
@@ -1305,11 +1305,11 @@ discard block |
||
1305 | 1305 | $sql = 'CASE'; |
1306 | 1306 | |
1307 | 1307 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1308 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1309 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1308 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1309 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1310 | 1310 | } |
1311 | 1311 | |
1312 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1312 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1313 | 1313 | |
1314 | 1314 | return $sql; |
1315 | 1315 | } |
@@ -1323,14 +1323,14 @@ discard block |
||
1323 | 1323 | */ |
1324 | 1324 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1325 | 1325 | { |
1326 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1326 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1327 | 1327 | |
1328 | 1328 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1329 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1330 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1329 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1330 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1331 | 1331 | } |
1332 | 1332 | |
1333 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1333 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1334 | 1334 | |
1335 | 1335 | return $sql; |
1336 | 1336 | } |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | |
1372 | 1372 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1373 | 1373 | |
1374 | - if (! $hidden) { |
|
1374 | + if ( ! $hidden) { |
|
1375 | 1375 | $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType()); |
1376 | 1376 | $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; |
1377 | 1377 | } |
@@ -1392,11 +1392,11 @@ discard block |
||
1392 | 1392 | $columnAlias = $this->getSQLColumnAlias(); |
1393 | 1393 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1394 | 1394 | |
1395 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1395 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1396 | 1396 | |
1397 | 1397 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1398 | 1398 | |
1399 | - if (! $hidden) { |
|
1399 | + if ( ! $hidden) { |
|
1400 | 1400 | // Conceptually we could resolve field type here by traverse through AST to retrieve field type, |
1401 | 1401 | // but this is not a feasible solution; assume 'string'. |
1402 | 1402 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
@@ -1407,11 +1407,11 @@ discard block |
||
1407 | 1407 | $columnAlias = $this->getSQLColumnAlias(); |
1408 | 1408 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1409 | 1409 | |
1410 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1410 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1411 | 1411 | |
1412 | 1412 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1413 | 1413 | |
1414 | - if (! $hidden) { |
|
1414 | + if ( ! $hidden) { |
|
1415 | 1415 | // We cannot resolve field type here; assume 'string'. |
1416 | 1416 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1417 | 1417 | } |
@@ -1435,7 +1435,7 @@ discard block |
||
1435 | 1435 | $class = $queryComp['metadata']; |
1436 | 1436 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1437 | 1437 | |
1438 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1438 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1439 | 1439 | $this->selectedClasses[$dqlAlias] = [ |
1440 | 1440 | 'class' => $class, |
1441 | 1441 | 'dqlAlias' => $dqlAlias, |
@@ -1447,7 +1447,7 @@ discard block |
||
1447 | 1447 | |
1448 | 1448 | // Select all fields from the queried class |
1449 | 1449 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1450 | - if (! ($property instanceof FieldMetadata)) { |
|
1450 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1451 | 1451 | continue; |
1452 | 1452 | } |
1453 | 1453 | |
@@ -1482,7 +1482,7 @@ discard block |
||
1482 | 1482 | $subClass = $this->em->getClassMetadata($subClassName); |
1483 | 1483 | |
1484 | 1484 | foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1485 | - if (! ($property instanceof FieldMetadata)) { |
|
1485 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1486 | 1486 | continue; |
1487 | 1487 | } |
1488 | 1488 | |
@@ -1521,7 +1521,7 @@ discard block |
||
1521 | 1521 | */ |
1522 | 1522 | public function walkQuantifiedExpression($qExpr) |
1523 | 1523 | { |
1524 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1524 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1525 | 1525 | } |
1526 | 1526 | |
1527 | 1527 | /** |
@@ -1561,7 +1561,7 @@ discard block |
||
1561 | 1561 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1562 | 1562 | } |
1563 | 1563 | |
1564 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1564 | + return ' FROM '.implode(', ', $sqlParts); |
|
1565 | 1565 | } |
1566 | 1566 | |
1567 | 1567 | /** |
@@ -1569,7 +1569,7 @@ discard block |
||
1569 | 1569 | */ |
1570 | 1570 | public function walkSimpleSelectClause($simpleSelectClause) |
1571 | 1571 | { |
1572 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1572 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1573 | 1573 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1574 | 1574 | } |
1575 | 1575 | |
@@ -1602,7 +1602,7 @@ discard block |
||
1602 | 1602 | break; |
1603 | 1603 | |
1604 | 1604 | case ($e instanceof AST\Subselect): |
1605 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1605 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1606 | 1606 | break; |
1607 | 1607 | |
1608 | 1608 | case ($e instanceof AST\PathExpression): |
@@ -1611,7 +1611,7 @@ discard block |
||
1611 | 1611 | $class = $qComp['metadata']; |
1612 | 1612 | $fieldType = $class->getProperty($e->field)->getType(); |
1613 | 1613 | |
1614 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1614 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1615 | 1615 | break; |
1616 | 1616 | |
1617 | 1617 | case ($e instanceof AST\Literal): |
@@ -1625,11 +1625,11 @@ discard block |
||
1625 | 1625 | break; |
1626 | 1626 | } |
1627 | 1627 | |
1628 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1628 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1629 | 1629 | break; |
1630 | 1630 | |
1631 | 1631 | default: |
1632 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1632 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1633 | 1633 | break; |
1634 | 1634 | } |
1635 | 1635 | |
@@ -1662,10 +1662,10 @@ discard block |
||
1662 | 1662 | case ($expr instanceof AST\Subselect): |
1663 | 1663 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1664 | 1664 | |
1665 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1665 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1666 | 1666 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1667 | 1667 | |
1668 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1668 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1669 | 1669 | break; |
1670 | 1670 | |
1671 | 1671 | case ($expr instanceof AST\Functions\FunctionNode): |
@@ -1682,7 +1682,7 @@ discard block |
||
1682 | 1682 | $columnAlias = $this->getSQLColumnAlias(); |
1683 | 1683 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1684 | 1684 | |
1685 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1685 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1686 | 1686 | break; |
1687 | 1687 | |
1688 | 1688 | case ($expr instanceof AST\ParenthesisExpression): |
@@ -1702,8 +1702,8 @@ discard block |
||
1702 | 1702 | */ |
1703 | 1703 | public function walkAggregateExpression($aggExpression) |
1704 | 1704 | { |
1705 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1706 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1705 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1706 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1707 | 1707 | } |
1708 | 1708 | |
1709 | 1709 | /** |
@@ -1717,7 +1717,7 @@ discard block |
||
1717 | 1717 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1718 | 1718 | } |
1719 | 1719 | |
1720 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1720 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1721 | 1721 | } |
1722 | 1722 | |
1723 | 1723 | /** |
@@ -1726,7 +1726,7 @@ discard block |
||
1726 | 1726 | public function walkGroupByItem($groupByItem) |
1727 | 1727 | { |
1728 | 1728 | // StateFieldPathExpression |
1729 | - if (! is_string($groupByItem)) { |
|
1729 | + if ( ! is_string($groupByItem)) { |
|
1730 | 1730 | return $this->walkPathExpression($groupByItem); |
1731 | 1731 | } |
1732 | 1732 | |
@@ -1780,7 +1780,7 @@ discard block |
||
1780 | 1780 | { |
1781 | 1781 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1782 | 1782 | $tableName = $class->getTableName(); |
1783 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1783 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1784 | 1784 | |
1785 | 1785 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1786 | 1786 | |
@@ -1796,12 +1796,12 @@ discard block |
||
1796 | 1796 | { |
1797 | 1797 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1798 | 1798 | $tableName = $class->getTableName(); |
1799 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1799 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1800 | 1800 | |
1801 | 1801 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1802 | 1802 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1803 | 1803 | |
1804 | - $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1804 | + $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1805 | 1805 | |
1806 | 1806 | return $sql; |
1807 | 1807 | } |
@@ -1814,7 +1814,7 @@ discard block |
||
1814 | 1814 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1815 | 1815 | $this->useSqlTableAliases = false; |
1816 | 1816 | |
1817 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1817 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1818 | 1818 | $newValue = $updateItem->newValue; |
1819 | 1819 | |
1820 | 1820 | switch (true) { |
@@ -1851,7 +1851,7 @@ discard block |
||
1851 | 1851 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1852 | 1852 | $filterExpr = $this->generateFilterConditionSQL($class, $tableAlias); |
1853 | 1853 | |
1854 | - if (! $filterExpr) { |
|
1854 | + if ( ! $filterExpr) { |
|
1855 | 1855 | continue; |
1856 | 1856 | } |
1857 | 1857 | |
@@ -1860,7 +1860,7 @@ discard block |
||
1860 | 1860 | |
1861 | 1861 | if ($filterClauses) { |
1862 | 1862 | if ($condSql) { |
1863 | - $condSql = '(' . $condSql . ') AND '; |
|
1863 | + $condSql = '('.$condSql.') AND '; |
|
1864 | 1864 | } |
1865 | 1865 | |
1866 | 1866 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1868,11 +1868,11 @@ discard block |
||
1868 | 1868 | } |
1869 | 1869 | |
1870 | 1870 | if ($condSql) { |
1871 | - return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1871 | + return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1872 | 1872 | } |
1873 | 1873 | |
1874 | 1874 | if ($discrSql) { |
1875 | - return ' WHERE ' . $discrSql; |
|
1875 | + return ' WHERE '.$discrSql; |
|
1876 | 1876 | } |
1877 | 1877 | |
1878 | 1878 | return ''; |
@@ -1885,7 +1885,7 @@ discard block |
||
1885 | 1885 | { |
1886 | 1886 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1887 | 1887 | // if only one ConditionalTerm is defined |
1888 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1888 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1889 | 1889 | return $this->walkConditionalTerm($condExpr); |
1890 | 1890 | } |
1891 | 1891 | |
@@ -1899,7 +1899,7 @@ discard block |
||
1899 | 1899 | { |
1900 | 1900 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1901 | 1901 | // if only one ConditionalFactor is defined |
1902 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1902 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1903 | 1903 | return $this->walkConditionalFactor($condTerm); |
1904 | 1904 | } |
1905 | 1905 | |
@@ -1915,7 +1915,7 @@ discard block |
||
1915 | 1915 | // if only one ConditionalPrimary is defined |
1916 | 1916 | return ( ! ($factor instanceof AST\ConditionalFactor)) |
1917 | 1917 | ? $this->walkConditionalPrimary($factor) |
1918 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1918 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1919 | 1919 | } |
1920 | 1920 | |
1921 | 1921 | /** |
@@ -1930,7 +1930,7 @@ discard block |
||
1930 | 1930 | if ($primary->isConditionalExpression()) { |
1931 | 1931 | $condExpr = $primary->conditionalExpression; |
1932 | 1932 | |
1933 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1933 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1934 | 1934 | } |
1935 | 1935 | } |
1936 | 1936 | |
@@ -1941,7 +1941,7 @@ discard block |
||
1941 | 1941 | { |
1942 | 1942 | $sql = ($existsExpr->not) ? 'NOT ' : ''; |
1943 | 1943 | |
1944 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1944 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1945 | 1945 | |
1946 | 1946 | return $sql; |
1947 | 1947 | } |
@@ -1990,7 +1990,7 @@ discard block |
||
1990 | 1990 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1991 | 1991 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1992 | 1992 | |
1993 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
1993 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
1994 | 1994 | |
1995 | 1995 | $sqlParts = []; |
1996 | 1996 | |
@@ -2011,7 +2011,7 @@ discard block |
||
2011 | 2011 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2012 | 2012 | } |
2013 | 2013 | |
2014 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2014 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2015 | 2015 | } |
2016 | 2016 | |
2017 | 2017 | $sql .= implode(' AND ', $sqlParts); |
@@ -2025,7 +2025,7 @@ discard block |
||
2025 | 2025 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2026 | 2026 | |
2027 | 2027 | // join to target table |
2028 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2028 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2029 | 2029 | |
2030 | 2030 | // join conditions |
2031 | 2031 | $joinSqlParts = []; |
@@ -2076,13 +2076,13 @@ discard block |
||
2076 | 2076 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2077 | 2077 | } |
2078 | 2078 | |
2079 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2079 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2080 | 2080 | } |
2081 | 2081 | |
2082 | 2082 | $sql .= implode(' AND ', $sqlParts); |
2083 | 2083 | } |
2084 | 2084 | |
2085 | - return $sql . ')'; |
|
2085 | + return $sql.')'; |
|
2086 | 2086 | } |
2087 | 2087 | |
2088 | 2088 | /** |
@@ -2093,7 +2093,7 @@ discard block |
||
2093 | 2093 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2094 | 2094 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2095 | 2095 | |
2096 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2096 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2097 | 2097 | } |
2098 | 2098 | |
2099 | 2099 | /** |
@@ -2102,19 +2102,19 @@ discard block |
||
2102 | 2102 | public function walkNullComparisonExpression($nullCompExpr) |
2103 | 2103 | { |
2104 | 2104 | $expression = $nullCompExpr->expression; |
2105 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2105 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2106 | 2106 | |
2107 | 2107 | // Handle ResultVariable |
2108 | 2108 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2109 | - return $this->walkResultVariable($expression) . $comparison; |
|
2109 | + return $this->walkResultVariable($expression).$comparison; |
|
2110 | 2110 | } |
2111 | 2111 | |
2112 | 2112 | // Handle InputParameter mapping inclusion to ParserResult |
2113 | 2113 | if ($expression instanceof AST\InputParameter) { |
2114 | - return $this->walkInputParameter($expression) . $comparison; |
|
2114 | + return $this->walkInputParameter($expression).$comparison; |
|
2115 | 2115 | } |
2116 | 2116 | |
2117 | - return $expression->dispatch($this) . $comparison; |
|
2117 | + return $expression->dispatch($this).$comparison; |
|
2118 | 2118 | } |
2119 | 2119 | |
2120 | 2120 | /** |
@@ -2122,7 +2122,7 @@ discard block |
||
2122 | 2122 | */ |
2123 | 2123 | public function walkInExpression($inExpr) |
2124 | 2124 | { |
2125 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2125 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2126 | 2126 | |
2127 | 2127 | $sql .= ($inExpr->subselect) |
2128 | 2128 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2146,12 +2146,12 @@ discard block |
||
2146 | 2146 | $discrColumnType = $discrColumn->getType(); |
2147 | 2147 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2148 | 2148 | $sqlTableAlias = $this->useSqlTableAliases |
2149 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2149 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2150 | 2150 | : ''; |
2151 | 2151 | |
2152 | 2152 | return sprintf( |
2153 | 2153 | '%s %sIN %s', |
2154 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2154 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2155 | 2155 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2156 | 2156 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2157 | 2157 | ); |
@@ -2198,8 +2198,8 @@ discard block |
||
2198 | 2198 | $sql .= ' NOT'; |
2199 | 2199 | } |
2200 | 2200 | |
2201 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2202 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2201 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2202 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2203 | 2203 | |
2204 | 2204 | return $sql; |
2205 | 2205 | } |
@@ -2214,7 +2214,7 @@ discard block |
||
2214 | 2214 | ? $this->walkResultVariable($stringExpr) |
2215 | 2215 | : $stringExpr->dispatch($this); |
2216 | 2216 | |
2217 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2217 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2218 | 2218 | |
2219 | 2219 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2220 | 2220 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2227,7 +2227,7 @@ discard block |
||
2227 | 2227 | } |
2228 | 2228 | |
2229 | 2229 | if ($likeExpr->escapeChar) { |
2230 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2230 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2231 | 2231 | } |
2232 | 2232 | |
2233 | 2233 | return $sql; |
@@ -2254,7 +2254,7 @@ discard block |
||
2254 | 2254 | ? $leftExpr->dispatch($this) |
2255 | 2255 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2256 | 2256 | |
2257 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2257 | + $sql .= ' '.$compExpr->operator.' '; |
|
2258 | 2258 | |
2259 | 2259 | $sql .= ($rightExpr instanceof AST\Node) |
2260 | 2260 | ? $rightExpr->dispatch($this) |
@@ -2290,7 +2290,7 @@ discard block |
||
2290 | 2290 | { |
2291 | 2291 | return ($arithmeticExpr->isSimpleArithmeticExpression()) |
2292 | 2292 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2293 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2293 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2294 | 2294 | } |
2295 | 2295 | |
2296 | 2296 | /** |
@@ -2298,7 +2298,7 @@ discard block |
||
2298 | 2298 | */ |
2299 | 2299 | public function walkSimpleArithmeticExpression($simpleArithmeticExpr) |
2300 | 2300 | { |
2301 | - if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2301 | + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2302 | 2302 | return $this->walkArithmeticTerm($simpleArithmeticExpr); |
2303 | 2303 | } |
2304 | 2304 | |
@@ -2318,7 +2318,7 @@ discard block |
||
2318 | 2318 | |
2319 | 2319 | // Phase 2 AST optimization: Skip processing of ArithmeticTerm |
2320 | 2320 | // if only one ArithmeticFactor is defined |
2321 | - if (! ($term instanceof AST\ArithmeticTerm)) { |
|
2321 | + if ( ! ($term instanceof AST\ArithmeticTerm)) { |
|
2322 | 2322 | return $this->walkArithmeticFactor($term); |
2323 | 2323 | } |
2324 | 2324 | |
@@ -2338,13 +2338,13 @@ discard block |
||
2338 | 2338 | |
2339 | 2339 | // Phase 2 AST optimization: Skip processing of ArithmeticFactor |
2340 | 2340 | // if only one ArithmeticPrimary is defined |
2341 | - if (! ($factor instanceof AST\ArithmeticFactor)) { |
|
2341 | + if ( ! ($factor instanceof AST\ArithmeticFactor)) { |
|
2342 | 2342 | return $this->walkArithmeticPrimary($factor); |
2343 | 2343 | } |
2344 | 2344 | |
2345 | 2345 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2346 | 2346 | |
2347 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2347 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2348 | 2348 | } |
2349 | 2349 | |
2350 | 2350 | /** |
@@ -2357,7 +2357,7 @@ discard block |
||
2357 | 2357 | public function walkArithmeticPrimary($primary) |
2358 | 2358 | { |
2359 | 2359 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2360 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2360 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2361 | 2361 | } |
2362 | 2362 | |
2363 | 2363 | if ($primary instanceof AST\Node) { |
@@ -2415,7 +2415,7 @@ discard block |
||
2415 | 2415 | $entityClassName = $entityClass->getClassName(); |
2416 | 2416 | |
2417 | 2417 | if ($entityClassName !== $rootClass->getClassName()) { |
2418 | - if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2418 | + if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2419 | 2419 | throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName()); |
2420 | 2420 | } |
2421 | 2421 | } |
@@ -2427,6 +2427,6 @@ discard block |
||
2427 | 2427 | $sqlParameterList[] = $this->conn->quote($discriminator); |
2428 | 2428 | } |
2429 | 2429 | |
2430 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2430 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2431 | 2431 | } |
2432 | 2432 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | */ |
46 | 46 | public function startProduction($name) |
47 | 47 | { |
48 | - $this->println('(' . $name); |
|
48 | + $this->println('('.$name); |
|
49 | 49 | $this->indent++; |
50 | 50 | } |
51 | 51 |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | */ |
253 | 253 | public function countDistinct($x) |
254 | 254 | { |
255 | - return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')'; |
|
255 | + return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')'; |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | } |
437 | 437 | } |
438 | 438 | |
439 | - return new Expr\Func($x . ' IN', (array) $y); |
|
439 | + return new Expr\Func($x.' IN', (array) $y); |
|
440 | 440 | } |
441 | 441 | |
442 | 442 | /** |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | } |
460 | 460 | } |
461 | 461 | |
462 | - return new Expr\Func($x . ' NOT IN', (array) $y); |
|
462 | + return new Expr\Func($x.' NOT IN', (array) $y); |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | /** |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | */ |
472 | 472 | public function isNull($x) |
473 | 473 | { |
474 | - return $x . ' IS NULL'; |
|
474 | + return $x.' IS NULL'; |
|
475 | 475 | } |
476 | 476 | |
477 | 477 | /** |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | */ |
484 | 484 | public function isNotNull($x) |
485 | 485 | { |
486 | - return $x . ' IS NOT NULL'; |
|
486 | + return $x.' IS NOT NULL'; |
|
487 | 487 | } |
488 | 488 | |
489 | 489 | /** |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | return $literal ? 'true' : 'false'; |
608 | 608 | } |
609 | 609 | |
610 | - return "'" . str_replace("'", "''", $literal) . "'"; |
|
610 | + return "'".str_replace("'", "''", $literal)."'"; |
|
611 | 611 | } |
612 | 612 | |
613 | 613 | /** |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | */ |
622 | 622 | public function between($val, $x, $y) |
623 | 623 | { |
624 | - return $val . ' BETWEEN ' . $x . ' AND ' . $y; |
|
624 | + return $val.' BETWEEN '.$x.' AND '.$y; |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | /** |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function __construct($sort = null, $order = null) |
35 | 35 | { |
36 | - if (! $sort) { |
|
36 | + if ( ! $sort) { |
|
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function add($sort, $order = null) |
48 | 48 | { |
49 | 49 | $order = ! $order ? 'ASC' : $order; |
50 | - $this->parts[] = $sort . ' ' . $order; |
|
50 | + $this->parts[] = $sort.' '.$order; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function __toString() |
73 | 73 | { |
74 | - return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator; |
|
74 | + return $this->preSeparator.implode($this->separator, $this->parts).$this->postSeparator; |
|
75 | 75 | } |
76 | 76 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $this->proxyFactory = new StaticProxyFactory($this, $this->config->buildGhostObjectFactory()); |
164 | 164 | $this->identifierFlattener = new IdentifierFlattener($this->unitOfWork, $this->metadataFactory); |
165 | 165 | |
166 | - if (! $config->isSecondLevelCacheEnabled()) { |
|
166 | + if ( ! $config->isSecondLevelCacheEnabled()) { |
|
167 | 167 | return; |
168 | 168 | } |
169 | 169 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | { |
292 | 292 | $query = new Query($this); |
293 | 293 | |
294 | - if (! empty($dql)) { |
|
294 | + if ( ! empty($dql)) { |
|
295 | 295 | $query->setDQL($dql); |
296 | 296 | } |
297 | 297 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); |
382 | 382 | $className = $class->getClassName(); |
383 | 383 | |
384 | - if (! is_array($id)) { |
|
384 | + if ( ! is_array($id)) { |
|
385 | 385 | if ($class->isIdentifierComposite()) { |
386 | 386 | throw ORMInvalidArgumentException::invalidCompositeIdentifier(); |
387 | 387 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | } |
391 | 391 | |
392 | 392 | foreach ($id as $i => $value) { |
393 | - if (! is_object($value) || ! $this->metadataFactory->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
393 | + if ( ! is_object($value) || ! $this->metadataFactory->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
394 | 394 | continue; |
395 | 395 | } |
396 | 396 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $sortedId = []; |
405 | 405 | |
406 | 406 | foreach ($class->identifier as $identifier) { |
407 | - if (! isset($id[$identifier])) { |
|
407 | + if ( ! isset($id[$identifier])) { |
|
408 | 408 | throw MissingIdentifierField::fromFieldAndClass($identifier, $className); |
409 | 409 | } |
410 | 410 | |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | // Check identity map first |
422 | 422 | $entity = $unitOfWork->tryGetById($sortedId, $class->getRootClassName()); |
423 | 423 | if ($entity !== false) { |
424 | - if (! ($entity instanceof $className)) { |
|
424 | + if ( ! ($entity instanceof $className)) { |
|
425 | 425 | return null; |
426 | 426 | } |
427 | 427 | |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | |
446 | 446 | switch (true) { |
447 | 447 | case $lockMode === LockMode::OPTIMISTIC: |
448 | - if (! $class->isVersioned()) { |
|
448 | + if ( ! $class->isVersioned()) { |
|
449 | 449 | throw OptimisticLockException::notVersioned($className); |
450 | 450 | } |
451 | 451 | |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | |
458 | 458 | case $lockMode === LockMode::PESSIMISTIC_READ: |
459 | 459 | case $lockMode === LockMode::PESSIMISTIC_WRITE: |
460 | - if (! $this->getConnection()->isTransactionActive()) { |
|
460 | + if ( ! $this->getConnection()->isTransactionActive()) { |
|
461 | 461 | throw TransactionRequiredException::transactionRequired(); |
462 | 462 | } |
463 | 463 | |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); |
477 | 477 | $className = $class->getClassName(); |
478 | 478 | |
479 | - if (! is_array($id)) { |
|
479 | + if ( ! is_array($id)) { |
|
480 | 480 | if ($class->isIdentifierComposite()) { |
481 | 481 | throw ORMInvalidArgumentException::invalidCompositeIdentifier(); |
482 | 482 | } |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | foreach ($id as $i => $value) { |
490 | 490 | $scalarId[$i] = $value; |
491 | 491 | |
492 | - if (! is_object($value) || ! $this->metadataFactory->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
492 | + if ( ! is_object($value) || ! $this->metadataFactory->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
493 | 493 | continue; |
494 | 494 | } |
495 | 495 | |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | $sortedId = []; |
504 | 504 | |
505 | 505 | foreach ($class->identifier as $identifier) { |
506 | - if (! isset($scalarId[$identifier])) { |
|
506 | + if ( ! isset($scalarId[$identifier])) { |
|
507 | 507 | throw MissingIdentifierField::fromFieldAndClass($identifier, $className); |
508 | 508 | } |
509 | 509 | |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); |
545 | 545 | $className = $class->getClassName(); |
546 | 546 | |
547 | - if (! is_array($id)) { |
|
547 | + if ( ! is_array($id)) { |
|
548 | 548 | if ($class->isIdentifierComposite()) { |
549 | 549 | throw ORMInvalidArgumentException::invalidCompositeIdentifier(); |
550 | 550 | } |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | } |
554 | 554 | |
555 | 555 | foreach ($id as $i => $value) { |
556 | - if (! is_object($value) || ! $this->metadataFactory->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
556 | + if ( ! is_object($value) || ! $this->metadataFactory->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
557 | 557 | continue; |
558 | 558 | } |
559 | 559 | |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | $sortedId = []; |
568 | 568 | |
569 | 569 | foreach ($class->identifier as $identifier) { |
570 | - if (! isset($id[$identifier])) { |
|
570 | + if ( ! isset($id[$identifier])) { |
|
571 | 571 | throw MissingIdentifierField::fromFieldAndClass($identifier, $className); |
572 | 572 | } |
573 | 573 | |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | |
610 | 610 | $this->unitOfWork = new UnitOfWork($this); |
611 | 611 | |
612 | - if (! $this->eventManager->hasListeners(Events::onClear)) { |
|
612 | + if ( ! $this->eventManager->hasListeners(Events::onClear)) { |
|
613 | 613 | return; |
614 | 614 | } |
615 | 615 | |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | */ |
643 | 643 | public function persist($entity) |
644 | 644 | { |
645 | - if (! is_object($entity)) { |
|
645 | + if ( ! is_object($entity)) { |
|
646 | 646 | throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()', $entity); |
647 | 647 | } |
648 | 648 | |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | */ |
665 | 665 | public function remove($entity) |
666 | 666 | { |
667 | - if (! is_object($entity)) { |
|
667 | + if ( ! is_object($entity)) { |
|
668 | 668 | throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()', $entity); |
669 | 669 | } |
670 | 670 | |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | */ |
685 | 685 | public function refresh($entity) |
686 | 686 | { |
687 | - if (! is_object($entity)) { |
|
687 | + if ( ! is_object($entity)) { |
|
688 | 688 | throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()', $entity); |
689 | 689 | } |
690 | 690 | |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | */ |
840 | 840 | public static function create($connection, Configuration $config, ?EventManager $eventManager = null) |
841 | 841 | { |
842 | - if (! $config->getMetadataDriverImpl()) { |
|
842 | + if ( ! $config->getMetadataDriverImpl()) { |
|
843 | 843 | throw MissingMappingDriverImplementation::create(); |
844 | 844 | } |
845 | 845 | |
@@ -866,12 +866,12 @@ discard block |
||
866 | 866 | return DriverManager::getConnection($connection, $config, $eventManager ?: new EventManager()); |
867 | 867 | } |
868 | 868 | |
869 | - if (! $connection instanceof Connection) { |
|
869 | + if ( ! $connection instanceof Connection) { |
|
870 | 870 | throw new \InvalidArgumentException( |
871 | 871 | sprintf( |
872 | 872 | 'Invalid $connection argument of type %s given%s.', |
873 | 873 | is_object($connection) ? get_class($connection) : gettype($connection), |
874 | - is_object($connection) ? '' : ': "' . $connection . '"' |
|
874 | + is_object($connection) ? '' : ': "'.$connection.'"' |
|
875 | 875 | ) |
876 | 876 | ); |
877 | 877 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // remove namespace separators from remaining class name |
46 | 46 | $fileName = str_replace('\\', '', $classNameRelativeToMetadataNamespace); |
47 | 47 | |
48 | - return $metadataDir . DIRECTORY_SEPARATOR . $fileName . '.php'; |
|
48 | + return $metadataDir.DIRECTORY_SEPARATOR.$fileName.'.php'; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | ) : \Closure { |
63 | 63 | $metadataNamespace = ltrim($metadataNamespace, '\\'); |
64 | 64 | |
65 | - if (! ($notFoundCallback === null || is_callable($notFoundCallback))) { |
|
65 | + if ( ! ($notFoundCallback === null || is_callable($notFoundCallback))) { |
|
66 | 66 | $type = is_object($notFoundCallback) ? get_class($notFoundCallback) : gettype($notFoundCallback); |
67 | 67 | |
68 | 68 | throw new InvalidArgumentException( |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | ); |
71 | 71 | } |
72 | 72 | |
73 | - $autoloader = function ($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) { |
|
73 | + $autoloader = function($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) { |
|
74 | 74 | if (strpos($className, $metadataNamespace) !== 0) { |
75 | 75 | return; |
76 | 76 | } |
@@ -181,7 +181,7 @@ |
||
181 | 181 | { |
182 | 182 | parent::addDeclaredProperty($property); |
183 | 183 | |
184 | - if (! ($property instanceof VersionFieldMetadata)) { |
|
184 | + if ( ! ($property instanceof VersionFieldMetadata)) { |
|
185 | 185 | return; |
186 | 186 | } |
187 | 187 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | $className = trim($className, '\\'); |
33 | 33 | |
34 | - if (! isset($this->instances[$className])) { |
|
34 | + if ( ! isset($this->instances[$className])) { |
|
35 | 35 | return; |
36 | 36 | } |
37 | 37 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function register($object) |
45 | 45 | { |
46 | - if (! is_object($object)) { |
|
46 | + if ( ! is_object($object)) { |
|
47 | 47 | throw new \InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object))); |
48 | 48 | } |
49 | 49 |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function getAllMetadata() : array |
126 | 126 | { |
127 | - if (! $this->initialized) { |
|
127 | + if ( ! $this->initialized) { |
|
128 | 128 | $this->initialize(); |
129 | 129 | } |
130 | 130 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | |
166 | 166 | try { |
167 | 167 | if ($this->cacheDriver) { |
168 | - $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt); |
|
168 | + $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt); |
|
169 | 169 | |
170 | 170 | if ($cached instanceof ClassMetadata) { |
171 | 171 | $this->loadedMetadata[$realClassName] = $cached; |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | foreach ($this->loadMetadata($realClassName, $metadataBuildingContext) as $loadedClass) { |
176 | 176 | $loadedClassName = $loadedClass->getClassName(); |
177 | 177 | |
178 | - $this->cacheDriver->save($loadedClassName . $this->cacheSalt, $loadedClass, null); |
|
178 | + $this->cacheDriver->save($loadedClassName.$this->cacheSalt, $loadedClass, null); |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 | } else { |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } catch (CommonMappingException $loadingException) { |
185 | 185 | $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext); |
186 | 186 | |
187 | - if (! $fallbackMetadataResponse) { |
|
187 | + if ( ! $fallbackMetadataResponse) { |
|
188 | 188 | throw $loadingException; |
189 | 189 | } |
190 | 190 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | */ |
221 | 221 | protected function loadMetadata(string $name, ClassMetadataBuildingContext $metadataBuildingContext) : array |
222 | 222 | { |
223 | - if (! $this->initialized) { |
|
223 | + if ( ! $this->initialized) { |
|
224 | 224 | $this->initialize(); |
225 | 225 | } |
226 | 226 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | */ |
257 | 257 | public function isTransient($className) : bool |
258 | 258 | { |
259 | - if (! $this->initialized) { |
|
259 | + if ( ! $this->initialized) { |
|
260 | 260 | $this->initialize(); |
261 | 261 | } |
262 | 262 |