@@ -1,7 +1,7 @@ |
||
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 |
@@ -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 |