@@ -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\Mapping; |
| 6 | 6 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // If $value is not a Collection then use an ArrayCollection. |
| 70 | - if (! $collection instanceof Collection) { |
|
| 70 | + if ( ! $collection instanceof Collection) { |
|
| 71 | 71 | // @todo guilhermeblanco Conceptually, support to custom collections by replacing ArrayCollection creation. |
| 72 | 72 | $collection = new ArrayCollection((array) $collection); |
| 73 | 73 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Mapping; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Mapping; |
| 6 | 6 | |
@@ -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\Mapping; |
| 6 | 6 | |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | $message = "The mapping of field '{$field}' is invalid: The option '{$expectedOption}' is required."; |
| 275 | 275 | |
| 276 | 276 | if ( ! empty($hint)) { |
| 277 | - $message .= ' (Hint: ' . $hint . ')'; |
|
| 277 | + $message .= ' (Hint: '.$hint.')'; |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | return new self($message); |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | public static function reflectionFailure($entity, \ReflectionException $previousException) |
| 306 | 306 | { |
| 307 | - return new self('An error occurred in ' . $entity, 0, $previousException); |
|
| 307 | + return new self('An error occurred in '.$entity, 0, $previousException); |
|
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | /** |
@@ -315,8 +315,8 @@ discard block |
||
| 315 | 315 | */ |
| 316 | 316 | public static function joinColumnMustPointToMappedField($className, $joinColumn) |
| 317 | 317 | { |
| 318 | - return new self('The column ' . $joinColumn . ' must be mapped to a field in class ' |
|
| 319 | - . $className . ' since it is referenced by a join column of another class.'); |
|
| 318 | + return new self('The column '.$joinColumn.' must be mapped to a field in class ' |
|
| 319 | + . $className.' since it is referenced by a join column of another class.'); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | /** |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | */ |
| 416 | 416 | public static function noIdDefined($entity) |
| 417 | 417 | { |
| 418 | - return new self('No ID defined for entity ' . $entity); |
|
| 418 | + return new self('No ID defined for entity '.$entity); |
|
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | /** |
@@ -436,12 +436,12 @@ discard block |
||
| 436 | 436 | public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) |
| 437 | 437 | { |
| 438 | 438 | if ( ! empty($path)) { |
| 439 | - $path = '[' . $path . ']'; |
|
| 439 | + $path = '['.$path.']'; |
|
| 440 | 440 | } |
| 441 | 441 | |
| 442 | 442 | return new self( |
| 443 | - 'File mapping drivers must have a valid directory path, ' . |
|
| 444 | - 'however the given path ' . $path . ' seems to be incorrect!' |
|
| 443 | + 'File mapping drivers must have a valid directory path, '. |
|
| 444 | + 'however the given path '.$path.' seems to be incorrect!' |
|
| 445 | 445 | ); |
| 446 | 446 | } |
| 447 | 447 | |
@@ -472,11 +472,11 @@ discard block |
||
| 472 | 472 | public static function duplicateDiscriminatorEntry($className, array $entries, array $map) |
| 473 | 473 | { |
| 474 | 474 | return new self( |
| 475 | - "The entries " . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " . |
|
| 476 | - "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. " . |
|
| 477 | - "The entries of the current map are: @DiscriminatorMap({" . implode(', ', array_map( |
|
| 475 | + "The entries ".implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ". |
|
| 476 | + "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ". |
|
| 477 | + "The entries of the current map are: @DiscriminatorMap({".implode(', ', array_map( |
|
| 478 | 478 | function($a, $b) { return "'$a': '$b'"; }, array_keys($map), array_values($map) |
| 479 | - )) . "})" |
|
| 479 | + ))."})" |
|
| 480 | 480 | ); |
| 481 | 481 | } |
| 482 | 482 | |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property) |
| 541 | 541 | { |
| 542 | 542 | return new self(sprintf( |
| 543 | - 'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' . |
|
| 543 | + 'It is not possible to set id field "%s" to type "%s" in entity class "%s". '. |
|
| 544 | 544 | 'The type "%s" requires conversion SQL which is not allowed for identifiers.', |
| 545 | 545 | $property->getName(), |
| 546 | 546 | $property->getTypeName(), |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | public static function illegalOrphanRemoval($className, $field) |
| 641 | 641 | { |
| 642 | 642 | return new self("Orphan removal is only allowed on one-to-one and one-to-many ". |
| 643 | - "associations, but " . $className."#" .$field . " is not."); |
|
| 643 | + "associations, but ".$className."#".$field." is not."); |
|
| 644 | 644 | } |
| 645 | 645 | |
| 646 | 646 | /** |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | */ |
| 673 | 673 | public static function noInheritanceOnMappedSuperClass($className) |
| 674 | 674 | { |
| 675 | - return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'."); |
|
| 675 | + return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'."); |
|
| 676 | 676 | } |
| 677 | 677 | |
| 678 | 678 | /** |
@@ -684,8 +684,8 @@ discard block |
||
| 684 | 684 | public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName) |
| 685 | 685 | { |
| 686 | 686 | return new self( |
| 687 | - "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . |
|
| 688 | - "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " . |
|
| 687 | + "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ". |
|
| 688 | + "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ". |
|
| 689 | 689 | "to avoid this exception from occurring." |
| 690 | 690 | ); |
| 691 | 691 | } |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | */ |
| 699 | 699 | public static function lifecycleCallbackMethodNotFound($className, $methodName) |
| 700 | 700 | { |
| 701 | - return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback."); |
|
| 701 | + return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback."); |
|
| 702 | 702 | } |
| 703 | 703 | |
| 704 | 704 | /** |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | */ |
| 745 | 745 | public static function invalidFetchMode($className, $annotation) |
| 746 | 746 | { |
| 747 | - return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'"); |
|
| 747 | + return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'"); |
|
| 748 | 748 | } |
| 749 | 749 | |
| 750 | 750 | /** |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | */ |
| 755 | 755 | public static function compositeKeyAssignedIdGeneratorRequired($className) |
| 756 | 756 | { |
| 757 | - return new self("Entity '". $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
| 757 | + return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
| 758 | 758 | } |
| 759 | 759 | |
| 760 | 760 | /** |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | */ |
| 767 | 767 | public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName) |
| 768 | 768 | { |
| 769 | - return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity."#".$associationName."'."); |
|
| 769 | + return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity."#".$associationName."'."); |
|
| 770 | 770 | } |
| 771 | 771 | |
| 772 | 772 | /** |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | */ |
| 779 | 779 | public static function invalidCascadeOption(array $cascades, $className, $propertyName) |
| 780 | 780 | { |
| 781 | - $cascades = implode(", ", array_map(function ($e) { return "'" . $e . "'"; }, $cascades)); |
|
| 781 | + $cascades = implode(", ", array_map(function($e) { return "'".$e."'"; }, $cascades)); |
|
| 782 | 782 | |
| 783 | 783 | return new self(sprintf( |
| 784 | 784 | "You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'", |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | { |
| 811 | 811 | return new self( |
| 812 | 812 | sprintf( |
| 813 | - 'Infinite nesting detected for embedded property %s::%s. ' . |
|
| 813 | + 'Infinite nesting detected for embedded property %s::%s. '. |
|
| 814 | 814 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
| 815 | 815 | $className, |
| 816 | 816 | $propertyName |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -declare(strict_types=1); |
|
| 4 | +declare(strict_types = 1); |
|
| 5 | 5 | |
| 6 | 6 | namespace Doctrine\ORM\Mapping; |
| 7 | 7 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @param string $className |
| 49 | 49 | * @param ComponentMetadata|null $parent |
| 50 | 50 | */ |
| 51 | - public function __construct(string $className, ?ComponentMetadata $parent = null) |
|
| 51 | + public function __construct(string $className, ? ComponentMetadata $parent = null) |
|
| 52 | 52 | { |
| 53 | 53 | $this->className = $className; |
| 54 | 54 | $this->parent = $parent; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | /** |
| 66 | 66 | * @return ComponentMetadata|null |
| 67 | 67 | */ |
| 68 | - public function getParent() : ?ComponentMetadata |
|
| 68 | + public function getParent() : ? ComponentMetadata |
|
| 69 | 69 | { |
| 70 | 70 | return $this->parent; |
| 71 | 71 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * @return \ReflectionClass|null |
| 75 | 75 | */ |
| 76 | - public function getReflectionClass() : ?\ReflectionClass |
|
| 76 | + public function getReflectionClass() : ? \ReflectionClass |
|
| 77 | 77 | { |
| 78 | 78 | return $this->reflectionClass; |
| 79 | 79 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return void |
| 85 | 85 | */ |
| 86 | - public function setCache(?CacheMetadata $cache = null) |
|
| 86 | + public function setCache(? CacheMetadata $cache = null) |
|
| 87 | 87 | { |
| 88 | 88 | $this->cache = $cache; |
| 89 | 89 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | /** |
| 92 | 92 | * @return CacheMetadata|null |
| 93 | 93 | */ |
| 94 | - public function getCache(): ?CacheMetadata |
|
| 94 | + public function getCache(): ? CacheMetadata |
|
| 95 | 95 | { |
| 96 | 96 | return $this->cache; |
| 97 | 97 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | { |
| 144 | 144 | $declaredPropertiesIterator = $this->getDeclaredPropertiesIterator(); |
| 145 | 145 | |
| 146 | - if (! $this->parent) { |
|
| 146 | + if ( ! $this->parent) { |
|
| 147 | 147 | return $declaredPropertiesIterator; |
| 148 | 148 | } |
| 149 | 149 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * |
| 161 | 161 | * @return null|Property |
| 162 | 162 | */ |
| 163 | - public function getProperty(string $propertyName) : ?Property |
|
| 163 | + public function getProperty(string $propertyName) : ? Property |
|
| 164 | 164 | { |
| 165 | 165 | if (isset($this->declaredProperties[$propertyName])) { |
| 166 | 166 | return $this->declaredProperties[$propertyName]; |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * |
| 193 | 193 | * @return string|null null if the input value is null |
| 194 | 194 | */ |
| 195 | - public function fullyQualifiedClassName(?string $className) : ?string |
|
| 195 | + public function fullyQualifiedClassName(? string $className) : ? string |
|
| 196 | 196 | { |
| 197 | 197 | if ($className === null || ! $this->reflectionClass) { |
| 198 | 198 | return $className; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Mapping; |
| 6 | 6 | |
@@ -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\Mapping\Driver; |
| 6 | 6 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | foreach ($this->drivers AS $namespace => $driver) { |
| 110 | 110 | $oid = spl_object_hash($driver); |
| 111 | 111 | |
| 112 | - if (!isset($driverClasses[$oid])) { |
|
| 112 | + if ( ! isset($driverClasses[$oid])) { |
|
| 113 | 113 | $driverClasses[$oid] = $driver->getAllClassNames(); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -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\Mapping\Driver; |
| 6 | 6 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | if ($locator instanceof FileLocator) { |
| 54 | 54 | $this->locator = $locator; |
| 55 | 55 | } else { |
| 56 | - $this->locator = new DefaultFileLocator((array)$locator, $fileExtension); |
|
| 56 | + $this->locator = new DefaultFileLocator((array) $locator, $fileExtension); |
|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | $result = $this->loadMappingFile($this->locator->findMappingFile($className)); |
| 123 | - if (!isset($result[$className])) { |
|
| 124 | - throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension()); |
|
| 123 | + if ( ! isset($result[$className])) { |
|
| 124 | + throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className).$this->locator->getFileExtension()); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | $this->classCache[$className] = $result[$className]; |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | return false; |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - return !$this->locator->fileExists($className); |
|
| 145 | + return ! $this->locator->fileExists($className); |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $this->initialize(); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - if (! $this->classCache) { |
|
| 157 | + if ( ! $this->classCache) { |
|
| 158 | 158 | return (array) $this->locator->getAllClassNames($this->globalBasename); |
| 159 | 159 | } |
| 160 | 160 | |
@@ -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\Mapping\Driver; |
| 6 | 6 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | $classNames = array_filter( |
| 120 | 120 | $this->locator->getAllClassNames(null), |
| 121 | - function ($className) { |
|
| 121 | + function($className) { |
|
| 122 | 122 | return ! $this->isTransient($className); |
| 123 | 123 | } |
| 124 | 124 | ); |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | ) |
| 207 | 207 | { |
| 208 | 208 | /** @var Annotation\Entity $entityAnnot */ |
| 209 | - $entityAnnot = $classAnnotations[Annotation\Entity::class]; |
|
| 209 | + $entityAnnot = $classAnnotations[Annotation\Entity::class]; |
|
| 210 | 210 | $classMetadata = new Mapping\ClassMetadata($reflectionClass->getName(), $parent); |
| 211 | 211 | |
| 212 | 212 | if ($entityAnnot->repositoryClass !== null) { |
@@ -272,12 +272,12 @@ discard block |
||
| 272 | 272 | /** @var Annotation\NamedQueries $namedQueriesAnnot */ |
| 273 | 273 | $namedQueriesAnnot = $classAnnotations[Annotation\NamedQueries::class]; |
| 274 | 274 | |
| 275 | - if (! is_array($namedQueriesAnnot->value)) { |
|
| 275 | + if ( ! is_array($namedQueriesAnnot->value)) { |
|
| 276 | 276 | throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations."); |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | foreach ($namedQueriesAnnot->value as $namedQuery) { |
| 280 | - if (! ($namedQuery instanceof Annotation\NamedQuery)) { |
|
| 280 | + if ( ! ($namedQuery instanceof Annotation\NamedQuery)) { |
|
| 281 | 281 | throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations."); |
| 282 | 282 | } |
| 283 | 283 | |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | foreach ($entityListenersAnnot->value as $item) { |
| 294 | 294 | $listenerClassName = $classMetadata->fullyQualifiedClassName($item); |
| 295 | 295 | |
| 296 | - if (! class_exists($listenerClassName)) { |
|
| 296 | + if ( ! class_exists($listenerClassName)) { |
|
| 297 | 297 | throw Mapping\MappingException::entityListenerClassNotFound( |
| 298 | 298 | $listenerClassName, |
| 299 | 299 | $reflectionClass->getName() |
@@ -340,15 +340,15 @@ discard block |
||
| 340 | 340 | |
| 341 | 341 | $discriminatorColumn->setColumnName($discriminatorColumnAnnot->name); |
| 342 | 342 | |
| 343 | - if (! empty($discriminatorColumnAnnot->columnDefinition)) { |
|
| 343 | + if ( ! empty($discriminatorColumnAnnot->columnDefinition)) { |
|
| 344 | 344 | $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnot->columnDefinition); |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | - if (! empty($discriminatorColumnAnnot->type)) { |
|
| 347 | + if ( ! empty($discriminatorColumnAnnot->type)) { |
|
| 348 | 348 | $discriminatorColumn->setType(Type::getType($discriminatorColumnAnnot->type)); |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | - if (! empty($discriminatorColumnAnnot->length)) { |
|
| 351 | + if ( ! empty($discriminatorColumnAnnot->length)) { |
|
| 352 | 352 | $discriminatorColumn->setLength($discriminatorColumnAnnot->length); |
| 353 | 353 | } |
| 354 | 354 | } |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | /** @var Annotation\DiscriminatorMap $discriminatorMapAnnotation */ |
| 365 | 365 | $discriminatorMapAnnotation = $classAnnotations[Annotation\DiscriminatorMap::class]; |
| 366 | 366 | $discriminatorMap = array_map( |
| 367 | - function ($className) use ($classMetadata) { |
|
| 367 | + function($className) use ($classMetadata) { |
|
| 368 | 368 | return $classMetadata->fullyQualifiedClassName($className); |
| 369 | 369 | }, |
| 370 | 370 | $discriminatorMapAnnotation->value |
@@ -415,11 +415,11 @@ discard block |
||
| 415 | 415 | { |
| 416 | 416 | $table = new Mapping\TableMetadata(); |
| 417 | 417 | |
| 418 | - if (! empty($tableAnnot->name)) { |
|
| 418 | + if ( ! empty($tableAnnot->name)) { |
|
| 419 | 419 | $table->setName($tableAnnot->name); |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - if (! empty($tableAnnot->schema)) { |
|
| 422 | + if ( ! empty($tableAnnot->schema)) { |
|
| 423 | 423 | $table->setSchema($tableAnnot->schema); |
| 424 | 424 | } |
| 425 | 425 | |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | { |
| 508 | 508 | $usage = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage)); |
| 509 | 509 | $baseRegion = strtolower(str_replace('\\', '_', $metadata->getRootClassName())); |
| 510 | - $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : ''); |
|
| 510 | + $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : ''); |
|
| 511 | 511 | |
| 512 | 512 | return new Mapping\CacheMetadata($usage, $cacheAnnot->region ?: $defaultRegion); |
| 513 | 513 | } |
@@ -629,11 +629,11 @@ discard block |
||
| 629 | 629 | $fieldMetadata->setPrimaryKey(true); |
| 630 | 630 | } |
| 631 | 631 | |
| 632 | - if (! empty($columnAnnot->columnDefinition)) { |
|
| 632 | + if ( ! empty($columnAnnot->columnDefinition)) { |
|
| 633 | 633 | $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition); |
| 634 | 634 | } |
| 635 | 635 | |
| 636 | - if (! empty($columnAnnot->length)) { |
|
| 636 | + if ( ! empty($columnAnnot->length)) { |
|
| 637 | 637 | $fieldMetadata->setLength($columnAnnot->length); |
| 638 | 638 | } |
| 639 | 639 | |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | break; |
| 655 | 655 | |
| 656 | 656 | default: |
| 657 | - if (! isset($customOptions['default'])) { |
|
| 657 | + if ( ! isset($customOptions['default'])) { |
|
| 658 | 658 | throw Mapping\MappingException::unsupportedOptimisticLockingType($fieldMetadata->getType()); |
| 659 | 659 | } |
| 660 | 660 | } |
@@ -695,11 +695,11 @@ discard block |
||
| 695 | 695 | $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval); |
| 696 | 696 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch)); |
| 697 | 697 | |
| 698 | - if (! empty($oneToOneAnnot->mappedBy)) { |
|
| 698 | + if ( ! empty($oneToOneAnnot->mappedBy)) { |
|
| 699 | 699 | $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy); |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | - if (! empty($oneToOneAnnot->inversedBy)) { |
|
| 702 | + if ( ! empty($oneToOneAnnot->inversedBy)) { |
|
| 703 | 703 | $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy); |
| 704 | 704 | } |
| 705 | 705 | |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade)); |
| 779 | 779 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch)); |
| 780 | 780 | |
| 781 | - if (! empty($manyToOneAnnot->inversedBy)) { |
|
| 781 | + if ( ! empty($manyToOneAnnot->inversedBy)) { |
|
| 782 | 782 | $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy); |
| 783 | 783 | } |
| 784 | 784 | |
@@ -858,11 +858,11 @@ discard block |
||
| 858 | 858 | $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval); |
| 859 | 859 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch)); |
| 860 | 860 | |
| 861 | - if (! empty($oneToManyAnnot->mappedBy)) { |
|
| 861 | + if ( ! empty($oneToManyAnnot->mappedBy)) { |
|
| 862 | 862 | $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy); |
| 863 | 863 | } |
| 864 | 864 | |
| 865 | - if (! empty($oneToManyAnnot->indexBy)) { |
|
| 865 | + if ( ! empty($oneToManyAnnot->indexBy)) { |
|
| 866 | 866 | $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy); |
| 867 | 867 | } |
| 868 | 868 | |
@@ -919,15 +919,15 @@ discard block |
||
| 919 | 919 | $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval); |
| 920 | 920 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch)); |
| 921 | 921 | |
| 922 | - if (! empty($manyToManyAnnot->mappedBy)) { |
|
| 922 | + if ( ! empty($manyToManyAnnot->mappedBy)) { |
|
| 923 | 923 | $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy); |
| 924 | 924 | } |
| 925 | 925 | |
| 926 | - if (! empty($manyToManyAnnot->inversedBy)) { |
|
| 926 | + if ( ! empty($manyToManyAnnot->inversedBy)) { |
|
| 927 | 927 | $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy); |
| 928 | 928 | } |
| 929 | 929 | |
| 930 | - if (! empty($manyToManyAnnot->indexBy)) { |
|
| 930 | + if ( ! empty($manyToManyAnnot->indexBy)) { |
|
| 931 | 931 | $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy); |
| 932 | 932 | } |
| 933 | 933 | |
@@ -983,11 +983,11 @@ discard block |
||
| 983 | 983 | { |
| 984 | 984 | $joinTable = new Mapping\JoinTableMetadata(); |
| 985 | 985 | |
| 986 | - if (! empty($joinTableAnnot->name)) { |
|
| 986 | + if ( ! empty($joinTableAnnot->name)) { |
|
| 987 | 987 | $joinTable->setName($joinTableAnnot->name); |
| 988 | 988 | } |
| 989 | 989 | |
| 990 | - if (! empty($joinTableAnnot->schema)) { |
|
| 990 | + if ( ! empty($joinTableAnnot->schema)) { |
|
| 991 | 991 | $joinTable->setSchema($joinTableAnnot->schema); |
| 992 | 992 | } |
| 993 | 993 | |
@@ -1043,11 +1043,11 @@ discard block |
||
| 1043 | 1043 | $joinColumn->setNullable($joinColumnAnnot->nullable); |
| 1044 | 1044 | $joinColumn->setUnique($joinColumnAnnot->unique); |
| 1045 | 1045 | |
| 1046 | - if (! empty($joinColumnAnnot->fieldName)) { |
|
| 1046 | + if ( ! empty($joinColumnAnnot->fieldName)) { |
|
| 1047 | 1047 | $joinColumn->setAliasedName($joinColumnAnnot->fieldName); |
| 1048 | 1048 | } |
| 1049 | 1049 | |
| 1050 | - if (! empty($joinColumnAnnot->columnDefinition)) { |
|
| 1050 | + if ( ! empty($joinColumnAnnot->columnDefinition)) { |
|
| 1051 | 1051 | $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition); |
| 1052 | 1052 | } |
| 1053 | 1053 | |
@@ -1105,7 +1105,7 @@ discard block |
||
| 1105 | 1105 | { |
| 1106 | 1106 | $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode); |
| 1107 | 1107 | |
| 1108 | - if (! defined($fetchModeConstant)) { |
|
| 1108 | + if ( ! defined($fetchModeConstant)) { |
|
| 1109 | 1109 | throw Mapping\MappingException::invalidFetchMode($className, $fetchMode); |
| 1110 | 1110 | } |
| 1111 | 1111 | |
@@ -1149,7 +1149,7 @@ discard block |
||
| 1149 | 1149 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
| 1150 | 1150 | |
| 1151 | 1151 | foreach ($classAnnotations as $key => $annot) { |
| 1152 | - if (! is_numeric($key)) { |
|
| 1152 | + if ( ! is_numeric($key)) { |
|
| 1153 | 1153 | continue; |
| 1154 | 1154 | } |
| 1155 | 1155 | |
@@ -1169,7 +1169,7 @@ discard block |
||
| 1169 | 1169 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
| 1170 | 1170 | |
| 1171 | 1171 | foreach ($propertyAnnotations as $key => $annot) { |
| 1172 | - if (! is_numeric($key)) { |
|
| 1172 | + if ( ! is_numeric($key)) { |
|
| 1173 | 1173 | continue; |
| 1174 | 1174 | } |
| 1175 | 1175 | |
@@ -1189,7 +1189,7 @@ discard block |
||
| 1189 | 1189 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
| 1190 | 1190 | |
| 1191 | 1191 | foreach ($methodAnnotations as $key => $annot) { |
| 1192 | - if (! is_numeric($key)) { |
|
| 1192 | + if ( ! is_numeric($key)) { |
|
| 1193 | 1193 | continue; |
| 1194 | 1194 | } |
| 1195 | 1195 | |