@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | protected function onNotFoundMetadata($className) |
| 107 | 107 | { |
| 108 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
| 108 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
| 109 | 109 | return; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $this->completeIdGeneratorMapping($class); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if (!$class->isMappedSuperclass) { |
|
| 165 | + if ( ! $class->isMappedSuperclass) { |
|
| 166 | 166 | foreach ($class->embeddedClasses as $property => $embeddableClass) { |
| 167 | 167 | |
| 168 | 168 | if (isset($embeddableClass['inherited'])) { |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | $identifier = $embeddableMetadata->getIdentifier(); |
| 189 | 189 | |
| 190 | - if (! empty($identifier)) { |
|
| 190 | + if ( ! empty($identifier)) { |
|
| 191 | 191 | $this->inheritIdGeneratorMapping($class, $embeddableMetadata); |
| 192 | 192 | } |
| 193 | 193 | |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | */ |
| 258 | 258 | protected function validateRuntimeMetadata($class, $parent) |
| 259 | 259 | { |
| 260 | - if ( ! $class->reflClass ) { |
|
| 260 | + if ( ! $class->reflClass) { |
|
| 261 | 261 | // only validate if there is a reflection class instance |
| 262 | 262 | return; |
| 263 | 263 | } |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | $class->validateLifecycleCallbacks($this->getReflectionService()); |
| 268 | 268 | |
| 269 | 269 | // verify inheritance |
| 270 | - if ( ! $class->isMappedSuperclass && !$class->isInheritanceTypeNone()) { |
|
| 270 | + if ( ! $class->isMappedSuperclass && ! $class->isInheritanceTypeNone()) { |
|
| 271 | 271 | if ( ! $parent) { |
| 272 | 272 | if (count($class->discriminatorMap) == 0) { |
| 273 | 273 | throw MappingException::missingDiscriminatorMap($class->name); |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | { |
| 429 | 429 | foreach ($parentClass->associationMappings as $field => $mapping) { |
| 430 | 430 | if ($parentClass->isMappedSuperclass) { |
| 431 | - if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) { |
|
| 431 | + if ($mapping['type'] & ClassMetadata::TO_MANY && ! $mapping['isOwningSide']) { |
|
| 432 | 432 | throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field); |
| 433 | 433 | } |
| 434 | 434 | $mapping['sourceEntity'] = $subClass->name; |
@@ -477,11 +477,11 @@ discard block |
||
| 477 | 477 | |
| 478 | 478 | $parentClass->mapEmbedded( |
| 479 | 479 | [ |
| 480 | - 'fieldName' => $prefix . '.' . $property, |
|
| 480 | + 'fieldName' => $prefix.'.'.$property, |
|
| 481 | 481 | 'class' => $embeddableMetadata->name, |
| 482 | 482 | 'columnPrefix' => $embeddableClass['columnPrefix'], |
| 483 | 483 | 'declaredField' => $embeddableClass['declaredField'] |
| 484 | - ? $prefix . '.' . $embeddableClass['declaredField'] |
|
| 484 | + ? $prefix.'.'.$embeddableClass['declaredField'] |
|
| 485 | 485 | : $prefix, |
| 486 | 486 | 'originalField' => $embeddableClass['originalField'] ?: $property, |
| 487 | 487 | ] |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | */ |
| 500 | 500 | private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass) |
| 501 | 501 | { |
| 502 | - if (! $parentClass->isMappedSuperclass) { |
|
| 502 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 503 | 503 | return; |
| 504 | 504 | } |
| 505 | 505 | |
@@ -707,14 +707,14 @@ discard block |
||
| 707 | 707 | throw new ORMException("Can't instantiate custom generator : no custom generator definition"); |
| 708 | 708 | } |
| 709 | 709 | if ( ! class_exists($definition['class'])) { |
| 710 | - throw new ORMException("Can't instantiate custom generator : " . |
|
| 710 | + throw new ORMException("Can't instantiate custom generator : ". |
|
| 711 | 711 | $definition['class']); |
| 712 | 712 | } |
| 713 | 713 | $class->setIdGenerator(new $definition['class']); |
| 714 | 714 | break; |
| 715 | 715 | |
| 716 | 716 | default: |
| 717 | - throw new ORMException("Unknown generator type: " . $class->generatorType); |
|
| 717 | + throw new ORMException("Unknown generator type: ".$class->generatorType); |
|
| 718 | 718 | } |
| 719 | 719 | } |
| 720 | 720 | |
@@ -764,7 +764,7 @@ discard block |
||
| 764 | 764 | */ |
| 765 | 765 | protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) |
| 766 | 766 | { |
| 767 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
| 767 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
| 768 | 768 | } |
| 769 | 769 | |
| 770 | 770 | /** |
@@ -788,7 +788,7 @@ discard block |
||
| 788 | 788 | */ |
| 789 | 789 | private function getTargetPlatform() |
| 790 | 790 | { |
| 791 | - if (!$this->targetPlatform) { |
|
| 791 | + if ( ! $this->targetPlatform) { |
|
| 792 | 792 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
| 793 | 793 | } |
| 794 | 794 | |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | $tokenStr = substr($dql, $token['position'], $length); |
| 487 | 487 | |
| 488 | 488 | // Building informative message |
| 489 | - $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message; |
|
| 489 | + $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message; |
|
| 490 | 490 | |
| 491 | 491 | throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL())); |
| 492 | 492 | } |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | // If the namespace is not given then assumes the first FROM entity namespace |
| 634 | 634 | if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) { |
| 635 | 635 | $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\')); |
| 636 | - $fqcn = $namespace . '\\' . $className; |
|
| 636 | + $fqcn = $namespace.'\\'.$className; |
|
| 637 | 637 | |
| 638 | 638 | if (class_exists($fqcn)) { |
| 639 | 639 | $expression->className = $fqcn; |
@@ -685,13 +685,13 @@ discard block |
||
| 685 | 685 | } |
| 686 | 686 | |
| 687 | 687 | $this->semanticalError( |
| 688 | - "There is no mapped field named '$field' on class " . $class->name . ".", $deferredItem['token'] |
|
| 688 | + "There is no mapped field named '$field' on class ".$class->name.".", $deferredItem['token'] |
|
| 689 | 689 | ); |
| 690 | 690 | } |
| 691 | 691 | |
| 692 | 692 | if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) { |
| 693 | 693 | $this->semanticalError( |
| 694 | - "The partial field selection of class " . $class->name . " must contain the identifier.", |
|
| 694 | + "The partial field selection of class ".$class->name." must contain the identifier.", |
|
| 695 | 695 | $deferredItem['token'] |
| 696 | 696 | ); |
| 697 | 697 | } |
@@ -760,7 +760,7 @@ discard block |
||
| 760 | 760 | // Check if field or association exists |
| 761 | 761 | if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) { |
| 762 | 762 | $this->semanticalError( |
| 763 | - 'Class ' . $class->name . ' has no field or association named ' . $field, |
|
| 763 | + 'Class '.$class->name.' has no field or association named '.$field, |
|
| 764 | 764 | $deferredItem['token'] |
| 765 | 765 | ); |
| 766 | 766 | } |
@@ -800,8 +800,8 @@ discard block |
||
| 800 | 800 | // Build the error message |
| 801 | 801 | $semanticalError = 'Invalid PathExpression. '; |
| 802 | 802 | $semanticalError .= (count($expectedStringTypes) == 1) |
| 803 | - ? 'Must be a ' . $expectedStringTypes[0] . '.' |
|
| 804 | - : implode(' or ', $expectedStringTypes) . ' expected.'; |
|
| 803 | + ? 'Must be a '.$expectedStringTypes[0].'.' |
|
| 804 | + : implode(' or ', $expectedStringTypes).' expected.'; |
|
| 805 | 805 | |
| 806 | 806 | $this->semanticalError($semanticalError, $deferredItem['token']); |
| 807 | 807 | } |
@@ -975,7 +975,7 @@ discard block |
||
| 975 | 975 | |
| 976 | 976 | [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']); |
| 977 | 977 | |
| 978 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
| 978 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
| 979 | 979 | } |
| 980 | 980 | |
| 981 | 981 | /** |
@@ -987,7 +987,7 @@ discard block |
||
| 987 | 987 | */ |
| 988 | 988 | private function validateAbstractSchemaName($schemaName) |
| 989 | 989 | { |
| 990 | - if (! (class_exists($schemaName, true) || interface_exists($schemaName, true))) { |
|
| 990 | + if ( ! (class_exists($schemaName, true) || interface_exists($schemaName, true))) { |
|
| 991 | 991 | $this->semanticalError("Class '$schemaName' is not defined.", $this->lexer->token); |
| 992 | 992 | } |
| 993 | 993 | } |
@@ -1043,7 +1043,7 @@ discard block |
||
| 1043 | 1043 | |
| 1044 | 1044 | if ( ! isset($this->queryComponents[$identVariable])) { |
| 1045 | 1045 | $this->semanticalError( |
| 1046 | - 'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.' |
|
| 1046 | + 'Identification Variable '.$identVariable.' used in join path expression but was not defined before.' |
|
| 1047 | 1047 | ); |
| 1048 | 1048 | } |
| 1049 | 1049 | |
@@ -1057,7 +1057,7 @@ discard block |
||
| 1057 | 1057 | $class = $qComp['metadata']; |
| 1058 | 1058 | |
| 1059 | 1059 | if ( ! $class->hasAssociation($field)) { |
| 1060 | - $this->semanticalError('Class ' . $class->name . ' has no association named ' . $field); |
|
| 1060 | + $this->semanticalError('Class '.$class->name.' has no association named '.$field); |
|
| 1061 | 1061 | } |
| 1062 | 1062 | |
| 1063 | 1063 | return new AST\JoinAssociationPathExpression($identVariable, $field); |
@@ -2480,7 +2480,7 @@ discard block |
||
| 2480 | 2480 | $peek = $this->peekBeyondClosingParenthesis(); |
| 2481 | 2481 | |
| 2482 | 2482 | if ($peek !== null && ( |
| 2483 | - in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) || |
|
| 2483 | + in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) || |
|
| 2484 | 2484 | in_array($peek['type'], [Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS]) || |
| 2485 | 2485 | $this->isMathOperator($peek) |
| 2486 | 2486 | )) { |
@@ -2586,7 +2586,7 @@ discard block |
||
| 2586 | 2586 | return $this->NullComparisonExpression(); |
| 2587 | 2587 | } |
| 2588 | 2588 | |
| 2589 | - if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { |
|
| 2589 | + if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { |
|
| 2590 | 2590 | return $this->EmptyCollectionComparisonExpression(); |
| 2591 | 2591 | } |
| 2592 | 2592 | |