@@ -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 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * @return void |
| 63 | 63 | */ |
| 64 | - public function setCacheDriver(?Cache $cacheDriver = null) : void |
|
| 64 | + public function setCacheDriver(? Cache $cacheDriver = null) : void |
|
| 65 | 65 | { |
| 66 | 66 | $this->cacheDriver = $cacheDriver; |
| 67 | 67 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * |
| 72 | 72 | * @return Cache|null |
| 73 | 73 | */ |
| 74 | - public function getCacheDriver() : ?Cache |
|
| 74 | + public function getCacheDriver() : ? Cache |
|
| 75 | 75 | { |
| 76 | 76 | return $this->cacheDriver; |
| 77 | 77 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function getAllMetadata() : array |
| 100 | 100 | { |
| 101 | - if (! $this->initialized) { |
|
| 101 | + if ( ! $this->initialized) { |
|
| 102 | 102 | $this->initialize(); |
| 103 | 103 | } |
| 104 | 104 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | try { |
| 206 | 206 | if ($this->cacheDriver) { |
| 207 | - $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt); |
|
| 207 | + $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt); |
|
| 208 | 208 | |
| 209 | 209 | if ($cached instanceof ClassMetadata) { |
| 210 | 210 | $this->loadedMetadata[$realClassName] = $cached; |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | } else { |
| 214 | 214 | foreach ($this->loadMetadata($realClassName, $metadataBuildingContext) as $loadedClassName) { |
| 215 | 215 | $this->cacheDriver->save( |
| 216 | - $loadedClassName . $this->cacheSalt, |
|
| 216 | + $loadedClassName.$this->cacheSalt, |
|
| 217 | 217 | $this->loadedMetadata[$loadedClassName], |
| 218 | 218 | null |
| 219 | 219 | ); |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $this->loadMetadata($realClassName, $metadataBuildingContext); |
| 224 | 224 | } |
| 225 | 225 | } catch (CommonMappingException $loadingException) { |
| 226 | - if (! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext)) { |
|
| 226 | + if ( ! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext)) { |
|
| 227 | 227 | throw $loadingException; |
| 228 | 228 | } |
| 229 | 229 | |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | protected function onNotFoundMetadata( |
| 365 | 365 | string $className, |
| 366 | 366 | ClassMetadataBuildingContext $metadataBuildingContext |
| 367 | - ) : ?ClassMetadata |
|
| 367 | + ) : ? ClassMetadata |
|
| 368 | 368 | { |
| 369 | 369 | return null; |
| 370 | 370 | } |
@@ -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 | |
@@ -89,9 +89,9 @@ discard block |
||
| 89 | 89 | protected function onNotFoundMetadata( |
| 90 | 90 | string $className, |
| 91 | 91 | ClassMetadataBuildingContext $metadataBuildingContext |
| 92 | - ) : ?ClassMetadata |
|
| 92 | + ) : ? ClassMetadata |
|
| 93 | 93 | { |
| 94 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
| 94 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
| 95 | 95 | return null; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - if (! $class->discriminatorMap && $class->inheritanceType !== InheritanceType::NONE && $class->isRootEntity()) { |
|
| 179 | + if ( ! $class->discriminatorMap && $class->inheritanceType !== InheritanceType::NONE && $class->isRootEntity()) { |
|
| 180 | 180 | $this->addDefaultDiscriminatorMap($class); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | continue; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - if (! ($property instanceof ToOneAssociationMetadata)) { |
|
| 225 | + if ( ! ($property instanceof ToOneAssociationMetadata)) { |
|
| 226 | 226 | continue; |
| 227 | 227 | } |
| 228 | 228 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | protected function validateRuntimeMetadata(ClassMetadata $class, ClassMetadata $parent = null) : void |
| 248 | 248 | { |
| 249 | - if (! $class->getReflectionClass()) { |
|
| 249 | + if ( ! $class->getReflectionClass()) { |
|
| 250 | 250 | // only validate if there is a reflection class instance |
| 251 | 251 | return; |
| 252 | 252 | } |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | |
| 559 | 559 | private function completeFieldIdentifierGeneratorMapping(FieldMetadata $field) |
| 560 | 560 | { |
| 561 | - if (!$field->hasValueGenerator()) { |
|
| 561 | + if ( ! $field->hasValueGenerator()) { |
|
| 562 | 562 | return; |
| 563 | 563 | } |
| 564 | 564 | |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | break; |
| 626 | 626 | |
| 627 | 627 | default: |
| 628 | - throw new ORMException("Unknown generator type: " . $generator->getType()); |
|
| 628 | + throw new ORMException("Unknown generator type: ".$generator->getType()); |
|
| 629 | 629 | } |
| 630 | 630 | } |
| 631 | 631 | |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | */ |
| 651 | 651 | protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) : string |
| 652 | 652 | { |
| 653 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
| 653 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | /** |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | */ |
| 675 | 675 | private function getTargetPlatform() : Platforms\AbstractPlatform |
| 676 | 676 | { |
| 677 | - if (!$this->targetPlatform) { |
|
| 677 | + if ( ! $this->targetPlatform) { |
|
| 678 | 678 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
| 679 | 679 | } |
| 680 | 680 | |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | $generatedProperties = []; |
| 693 | 693 | |
| 694 | 694 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
| 695 | - if (! ($property instanceof LocalColumnMetadata && $property->hasValueGenerator())) { |
|
| 695 | + if ( ! ($property instanceof LocalColumnMetadata && $property->hasValueGenerator())) { |
|
| 696 | 696 | continue; |
| 697 | 697 | } |
| 698 | 698 | |