@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public static function pathRequired() |
25 | 25 | { |
26 | - return new self('Specifying the paths to your entities is required ' . |
|
26 | + return new self('Specifying the paths to your entities is required '. |
|
27 | 27 | 'in the AnnotationDriver to retrieve all class names.'); |
28 | 28 | } |
29 | 29 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | public static function missingQueryMapping($entity, $queryName) |
215 | 215 | { |
216 | - return new self('Query named "' . $queryName . '" in "' . $entity . ' requires a result class or result set mapping.'); |
|
216 | + return new self('Query named "'.$queryName.'" in "'.$entity.' requires a result class or result set mapping.'); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | public static function missingResultSetMappingEntity($entity, $resultName) |
226 | 226 | { |
227 | - return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a entity class name.'); |
|
227 | + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a entity class name.'); |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | /** |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | */ |
236 | 236 | public static function missingResultSetMappingFieldName($entity, $resultName) |
237 | 237 | { |
238 | - return new self('Result set mapping named "' . $resultName . '" in "' . $entity . ' requires a field name.'); |
|
238 | + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.' requires a field name.'); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
@@ -282,8 +282,8 @@ discard block |
||
282 | 282 | { |
283 | 283 | $message = sprintf("The mapping of field '%s' is invalid: The option '%s' is required.", $field, $expectedOption); |
284 | 284 | |
285 | - if (! empty($hint)) { |
|
286 | - $message .= ' (Hint: ' . $hint . ')'; |
|
285 | + if ( ! empty($hint)) { |
|
286 | + $message .= ' (Hint: '.$hint.')'; |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | return new self($message); |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | */ |
313 | 313 | public static function reflectionFailure($entity, ReflectionException $previousException) |
314 | 314 | { |
315 | - return new self('An error occurred in ' . $entity, 0, $previousException); |
|
315 | + return new self('An error occurred in '.$entity, 0, $previousException); |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | /** |
@@ -323,8 +323,8 @@ discard block |
||
323 | 323 | */ |
324 | 324 | public static function joinColumnMustPointToMappedField($className, $joinColumn) |
325 | 325 | { |
326 | - return new self('The column ' . $joinColumn . ' must be mapped to a field in class ' |
|
327 | - . $className . ' since it is referenced by a join column of another class.'); |
|
326 | + return new self('The column '.$joinColumn.' must be mapped to a field in class ' |
|
327 | + . $className.' since it is referenced by a join column of another class.'); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | /** |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public static function propertyTypeIsRequired($className, $propertyName) |
360 | 360 | { |
361 | - return new self("The attribute 'type' is required for the column description of property " . $className . '::$' . $propertyName . '.'); |
|
361 | + return new self("The attribute 'type' is required for the column description of property ".$className.'::$'.$propertyName.'.'); |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | /** |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | */ |
369 | 369 | public static function tableIdGeneratorNotImplemented($className) |
370 | 370 | { |
371 | - return new self('TableIdGenerator is not yet implemented for use with class ' . $className); |
|
371 | + return new self('TableIdGenerator is not yet implemented for use with class '.$className); |
|
372 | 372 | } |
373 | 373 | |
374 | 374 | /** |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | */ |
395 | 395 | public static function duplicateQueryMapping($entity, $queryName) |
396 | 396 | { |
397 | - return new self('Query named "' . $queryName . '" in "' . $entity . '" was already declared, but it must be declared only once'); |
|
397 | + return new self('Query named "'.$queryName.'" in "'.$entity.'" was already declared, but it must be declared only once'); |
|
398 | 398 | } |
399 | 399 | |
400 | 400 | /** |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | */ |
406 | 406 | public static function duplicateResultSetMapping($entity, $resultName) |
407 | 407 | { |
408 | - return new self('Result set mapping named "' . $resultName . '" in "' . $entity . '" was already declared, but it must be declared only once'); |
|
408 | + return new self('Result set mapping named "'.$resultName.'" in "'.$entity.'" was already declared, but it must be declared only once'); |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | /** |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | */ |
416 | 416 | public static function singleIdNotAllowedOnCompositePrimaryKey($entity) |
417 | 417 | { |
418 | - return new self('Single id is not allowed on composite primary key in entity ' . $entity); |
|
418 | + return new self('Single id is not allowed on composite primary key in entity '.$entity); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | /** |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | */ |
426 | 426 | public static function noIdDefined($entity) |
427 | 427 | { |
428 | - return new self('No ID defined for entity ' . $entity); |
|
428 | + return new self('No ID defined for entity '.$entity); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | */ |
436 | 436 | public static function unsupportedOptimisticLockingType($unsupportedType) |
437 | 437 | { |
438 | - return new self('Locking type "' . $unsupportedType->getName() . '" is not supported by Doctrine.'); |
|
438 | + return new self('Locking type "'.$unsupportedType->getName().'" is not supported by Doctrine.'); |
|
439 | 439 | } |
440 | 440 | |
441 | 441 | /** |
@@ -445,13 +445,13 @@ discard block |
||
445 | 445 | */ |
446 | 446 | public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) |
447 | 447 | { |
448 | - if (! empty($path)) { |
|
449 | - $path = '[' . $path . ']'; |
|
448 | + if ( ! empty($path)) { |
|
449 | + $path = '['.$path.']'; |
|
450 | 450 | } |
451 | 451 | |
452 | 452 | return new self( |
453 | - 'File mapping drivers must have a valid directory path, ' . |
|
454 | - 'however the given path ' . $path . ' seems to be incorrect!' |
|
453 | + 'File mapping drivers must have a valid directory path, '. |
|
454 | + 'however the given path '.$path.' seems to be incorrect!' |
|
455 | 455 | ); |
456 | 456 | } |
457 | 457 | |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | public static function invalidClassInDiscriminatorMap($className, $owningClass) |
468 | 468 | { |
469 | 469 | return new self(sprintf( |
470 | - "Entity class '%s' used in the discriminator map of class '%s' " . |
|
470 | + "Entity class '%s' used in the discriminator map of class '%s' ". |
|
471 | 471 | 'does not exist.', |
472 | 472 | $className, |
473 | 473 | $owningClass |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | public static function sqlConversionNotAllowedForPrimaryKeyProperties($className, Property $property) |
534 | 534 | { |
535 | 535 | return new self(sprintf( |
536 | - 'It is not possible to set id field "%s" to type "%s" in entity class "%s". ' . |
|
536 | + 'It is not possible to set id field "%s" to type "%s" in entity class "%s". '. |
|
537 | 537 | 'The type "%s" requires conversion SQL which is not allowed for identifiers.', |
538 | 538 | $property->getName(), |
539 | 539 | $property->getTypeName(), |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | */ |
570 | 570 | public static function duplicateColumnName($className, $columnName) |
571 | 571 | { |
572 | - return new self("Duplicate definition of column '" . $columnName . "' on entity '" . $className . "' in a field or discriminator column mapping."); |
|
572 | + return new self("Duplicate definition of column '".$columnName."' on entity '".$className."' in a field or discriminator column mapping."); |
|
573 | 573 | } |
574 | 574 | |
575 | 575 | /** |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | */ |
581 | 581 | public static function illegalToManyAssociationOnMappedSuperclass($className, $field) |
582 | 582 | { |
583 | - return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '" . $className . '#' . $field . "'."); |
|
583 | + return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className.'#'.$field."'."); |
|
584 | 584 | } |
585 | 585 | |
586 | 586 | /** |
@@ -592,8 +592,8 @@ discard block |
||
592 | 592 | */ |
593 | 593 | public static function cannotMapCompositePrimaryKeyEntitiesAsForeignId($className, $targetEntity, $targetField) |
594 | 594 | { |
595 | - return new self("It is not possible to map entity '" . $className . "' with a composite primary key " . |
|
596 | - "as part of the primary key of another entity '" . $targetEntity . '#' . $targetField . "'."); |
|
595 | + return new self("It is not possible to map entity '".$className."' with a composite primary key ". |
|
596 | + "as part of the primary key of another entity '".$targetEntity.'#'.$targetField."'."); |
|
597 | 597 | } |
598 | 598 | |
599 | 599 | /** |
@@ -647,8 +647,8 @@ discard block |
||
647 | 647 | */ |
648 | 648 | public static function illegalOrphanRemoval($className, $field) |
649 | 649 | { |
650 | - return new self('Orphan removal is only allowed on one-to-one and one-to-many ' . |
|
651 | - 'associations, but ' . $className . '#' . $field . ' is not.'); |
|
650 | + return new self('Orphan removal is only allowed on one-to-one and one-to-many '. |
|
651 | + 'associations, but '.$className.'#'.$field.' is not.'); |
|
652 | 652 | } |
653 | 653 | |
654 | 654 | /** |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | */ |
681 | 681 | public static function noInheritanceOnMappedSuperClass($className) |
682 | 682 | { |
683 | - return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'."); |
|
683 | + return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'."); |
|
684 | 684 | } |
685 | 685 | |
686 | 686 | /** |
@@ -692,8 +692,8 @@ discard block |
||
692 | 692 | public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName) |
693 | 693 | { |
694 | 694 | return new self( |
695 | - "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . |
|
696 | - "to be properly mapped in the inheritance hierarchy. Alternatively you can make '" . $className . "' an abstract class " . |
|
695 | + "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ". |
|
696 | + "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ". |
|
697 | 697 | 'to avoid this exception from occurring.' |
698 | 698 | ); |
699 | 699 | } |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | */ |
707 | 707 | public static function lifecycleCallbackMethodNotFound($className, $methodName) |
708 | 708 | { |
709 | - return new self("Entity '" . $className . "' has no public method '" . $methodName . "' to be registered as lifecycle callback."); |
|
709 | + return new self("Entity '".$className."' has no public method '".$methodName."' to be registered as lifecycle callback."); |
|
710 | 710 | } |
711 | 711 | |
712 | 712 | /** |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | */ |
741 | 741 | public static function invalidFetchMode($className, $annotation) |
742 | 742 | { |
743 | - return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'"); |
|
743 | + return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'"); |
|
744 | 744 | } |
745 | 745 | |
746 | 746 | /** |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | */ |
751 | 751 | public static function compositeKeyAssignedIdGeneratorRequired($className) |
752 | 752 | { |
753 | - return new self("Entity '" . $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
753 | + return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
754 | 754 | } |
755 | 755 | |
756 | 756 | /** |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | */ |
763 | 763 | public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName) |
764 | 764 | { |
765 | - return new self("The target-entity '" . $targetEntity . "' cannot be found in '" . $sourceEntity . '#' . $associationName . "'."); |
|
765 | + return new self("The target-entity '".$targetEntity."' cannot be found in '".$sourceEntity.'#'.$associationName."'."); |
|
766 | 766 | } |
767 | 767 | |
768 | 768 | /** |
@@ -774,8 +774,8 @@ discard block |
||
774 | 774 | */ |
775 | 775 | public static function invalidCascadeOption(array $cascades, $className, $propertyName) |
776 | 776 | { |
777 | - $cascades = implode(', ', array_map(static function ($e) { |
|
778 | - return "'" . $e . "'"; |
|
777 | + $cascades = implode(', ', array_map(static function($e) { |
|
778 | + return "'".$e."'"; |
|
779 | 779 | }, $cascades)); |
780 | 780 | |
781 | 781 | return new self(sprintf( |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | { |
809 | 809 | return new self( |
810 | 810 | sprintf( |
811 | - 'Infinite nesting detected for embedded property %s::%s. ' . |
|
811 | + 'Infinite nesting detected for embedded property %s::%s. '. |
|
812 | 812 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
813 | 813 | $className, |
814 | 814 | $propertyName |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | { |
824 | 824 | return new self( |
825 | 825 | sprintf( |
826 | - 'Class %s not found in namespaces %s.' . |
|
826 | + 'Class %s not found in namespaces %s.'. |
|
827 | 827 | $className, |
828 | 828 | implode(', ', $namespaces) |
829 | 829 | ) |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | string $className, |
82 | 82 | ClassMetadataBuildingContext $metadataBuildingContext |
83 | 83 | ) : ?ClassMetadata { |
84 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
84 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
85 | 85 | return null; |
86 | 86 | } |
87 | 87 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | protected function completeRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void |
124 | 124 | { |
125 | - if (! $parent || ! $parent->isMappedSuperclass) { |
|
125 | + if ( ! $parent || ! $parent->isMappedSuperclass) { |
|
126 | 126 | return; |
127 | 127 | } |
128 | 128 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | continue; |
141 | 141 | } |
142 | 142 | |
143 | - if (! ($property instanceof ToOneAssociationMetadata)) { |
|
143 | + if ( ! ($property instanceof ToOneAssociationMetadata)) { |
|
144 | 144 | continue; |
145 | 145 | } |
146 | 146 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | protected function validateRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void |
161 | 161 | { |
162 | - if (! $class->getReflectionClass()) { |
|
162 | + if ( ! $class->getReflectionClass()) { |
|
163 | 163 | // only validate if there is a reflection class instance |
164 | 164 | return; |
165 | 165 | } |
@@ -169,13 +169,13 @@ discard block |
||
169 | 169 | $class->validateLifecycleCallbacks($this->getReflectionService()); |
170 | 170 | |
171 | 171 | // verify inheritance |
172 | - if (! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) { |
|
173 | - if (! $parent) { |
|
174 | - if (! $class->discriminatorMap) { |
|
172 | + if ( ! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) { |
|
173 | + if ( ! $parent) { |
|
174 | + if ( ! $class->discriminatorMap) { |
|
175 | 175 | throw MappingException::missingDiscriminatorMap($class->getClassName()); |
176 | 176 | } |
177 | 177 | |
178 | - if (! $class->discriminatorColumn) { |
|
178 | + if ( ! $class->discriminatorColumn) { |
|
179 | 179 | throw MappingException::missingDiscriminatorColumn($class->getClassName()); |
180 | 180 | } |
181 | 181 | } |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | private function completeIdentifierGeneratorMappings(ClassMetadata $class) : void |
243 | 243 | { |
244 | 244 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
245 | - if (! $property instanceof FieldMetadata /*&& ! $property instanceof AssociationMetadata*/) { |
|
245 | + if ( ! $property instanceof FieldMetadata /*&& ! $property instanceof AssociationMetadata*/) { |
|
246 | 246 | continue; |
247 | 247 | } |
248 | 248 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | |
253 | 253 | private function completeFieldIdentifierGeneratorMapping(FieldMetadata $field) |
254 | 254 | { |
255 | - if (! $field->hasValueGenerator()) { |
|
255 | + if ( ! $field->hasValueGenerator()) { |
|
256 | 256 | return; |
257 | 257 | } |
258 | 258 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | |
328 | 328 | private function getTargetPlatform() : Platforms\AbstractPlatform |
329 | 329 | { |
330 | - if (! $this->targetPlatform) { |
|
330 | + if ( ! $this->targetPlatform) { |
|
331 | 331 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
332 | 332 | } |
333 | 333 |
@@ -239,11 +239,11 @@ discard block |
||
239 | 239 | $this->setCache(clone $parent->cache); |
240 | 240 | } |
241 | 241 | |
242 | - if (! empty($parent->lifecycleCallbacks)) { |
|
242 | + if ( ! empty($parent->lifecycleCallbacks)) { |
|
243 | 243 | $this->lifecycleCallbacks = $parent->lifecycleCallbacks; |
244 | 244 | } |
245 | 245 | |
246 | - if (! empty($parent->entityListeners)) { |
|
246 | + if ( ! empty($parent->entityListeners)) { |
|
247 | 247 | $this->entityListeners = $parent->entityListeners; |
248 | 248 | } |
249 | 249 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | public function __toString() |
312 | 312 | { |
313 | - return self::class . '@' . spl_object_id($this); |
|
313 | + return self::class.'@'.spl_object_id($this); |
|
314 | 314 | } |
315 | 315 | |
316 | 316 | /** |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | // Restore ReflectionClass and properties |
398 | 398 | $this->reflectionClass = $reflectionService->getClass($this->className); |
399 | 399 | |
400 | - if (! $this->reflectionClass) { |
|
400 | + if ( ! $this->reflectionClass) { |
|
401 | 401 | return; |
402 | 402 | } |
403 | 403 | |
@@ -426,11 +426,11 @@ discard block |
||
426 | 426 | */ |
427 | 427 | public function isIdentifier(string $fieldName) : bool |
428 | 428 | { |
429 | - if (! $this->identifier) { |
|
429 | + if ( ! $this->identifier) { |
|
430 | 430 | return false; |
431 | 431 | } |
432 | 432 | |
433 | - if (! $this->isIdentifierComposite()) { |
|
433 | + if ( ! $this->isIdentifierComposite()) { |
|
434 | 434 | return $fieldName === $this->identifier[0]; |
435 | 435 | } |
436 | 436 | |
@@ -454,11 +454,11 @@ discard block |
||
454 | 454 | } |
455 | 455 | |
456 | 456 | // Verify & complete identifier mapping |
457 | - if (! $this->identifier) { |
|
457 | + if ( ! $this->identifier) { |
|
458 | 458 | throw MappingException::identifierRequired($this->className); |
459 | 459 | } |
460 | 460 | |
461 | - $explicitlyGeneratedProperties = array_filter($this->declaredProperties, static function (Property $property) : bool { |
|
461 | + $explicitlyGeneratedProperties = array_filter($this->declaredProperties, static function(Property $property) : bool { |
|
462 | 462 | return $property instanceof FieldMetadata |
463 | 463 | && $property->isPrimaryKey() |
464 | 464 | && $property->hasValueGenerator(); |
@@ -477,14 +477,14 @@ discard block |
||
477 | 477 | public function validateAssociations() : void |
478 | 478 | { |
479 | 479 | array_map( |
480 | - function (Property $property) { |
|
481 | - if (! ($property instanceof AssociationMetadata)) { |
|
480 | + function(Property $property) { |
|
481 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
482 | 482 | return; |
483 | 483 | } |
484 | 484 | |
485 | 485 | $targetEntity = $property->getTargetEntity(); |
486 | 486 | |
487 | - if (! class_exists($targetEntity)) { |
|
487 | + if ( ! class_exists($targetEntity)) { |
|
488 | 488 | throw MappingException::invalidTargetEntityClass($targetEntity, $this->className, $property->getName()); |
489 | 489 | } |
490 | 490 | }, |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | foreach ($this->lifecycleCallbacks as $callbacks) { |
503 | 503 | /** @var array $callbacks */ |
504 | 504 | foreach ($callbacks as $callbackFuncName) { |
505 | - if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
505 | + if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
506 | 506 | throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName); |
507 | 507 | } |
508 | 508 | } |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | $fieldName = $property->getName(); |
552 | 552 | $targetEntity = $property->getTargetEntity(); |
553 | 553 | |
554 | - if (! $targetEntity) { |
|
554 | + if ( ! $targetEntity) { |
|
555 | 555 | throw MappingException::missingTargetEntity($fieldName); |
556 | 556 | } |
557 | 557 | |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | throw MappingException::illegalToManyIdentifierAssociation($this->className, $property->getName()); |
581 | 581 | } |
582 | 582 | |
583 | - if (! in_array($property->getName(), $this->identifier, true)) { |
|
583 | + if ( ! in_array($property->getName(), $this->identifier, true)) { |
|
584 | 584 | $this->identifier[] = $property->getName(); |
585 | 585 | } |
586 | 586 | } |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | /** @var JoinColumnMetadata $joinColumn */ |
627 | 627 | if ($property instanceof OneToOneAssociationMetadata && $this->inheritanceType !== InheritanceType::SINGLE_TABLE) { |
628 | 628 | if (count($property->getJoinColumns()) === 1) { |
629 | - if (! $property->isPrimaryKey()) { |
|
629 | + if ( ! $property->isPrimaryKey()) { |
|
630 | 630 | $joinColumn->setUnique(true); |
631 | 631 | } |
632 | 632 | } else { |
@@ -634,13 +634,13 @@ discard block |
||
634 | 634 | } |
635 | 635 | } |
636 | 636 | |
637 | - $joinColumn->setTableName(! $this->isMappedSuperclass ? $this->getTableName() : null); |
|
637 | + $joinColumn->setTableName( ! $this->isMappedSuperclass ? $this->getTableName() : null); |
|
638 | 638 | |
639 | - if (! $joinColumn->getColumnName()) { |
|
639 | + if ( ! $joinColumn->getColumnName()) { |
|
640 | 640 | $joinColumn->setColumnName($this->namingStrategy->joinColumnName($fieldName, $this->className)); |
641 | 641 | } |
642 | 642 | |
643 | - if (! $joinColumn->getReferencedColumnName()) { |
|
643 | + if ( ! $joinColumn->getReferencedColumnName()) { |
|
644 | 644 | $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
645 | 645 | } |
646 | 646 | |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | } |
649 | 649 | |
650 | 650 | if ($uniqueConstraintColumns) { |
651 | - if (! $this->table) { |
|
651 | + if ( ! $this->table) { |
|
652 | 652 | throw new RuntimeException( |
653 | 653 | 'ClassMetadata::setTable() has to be called before defining a one to one relationship.' |
654 | 654 | ); |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | if ($property->isOrphanRemoval()) { |
669 | 669 | $cascades = $property->getCascade(); |
670 | 670 | |
671 | - if (! in_array('remove', $cascades, true)) { |
|
671 | + if ( ! in_array('remove', $cascades, true)) { |
|
672 | 672 | $cascades[] = 'remove'; |
673 | 673 | |
674 | 674 | $property->setCascade($cascades); |
@@ -731,14 +731,14 @@ discard block |
||
731 | 731 | protected function validateAndCompleteOneToManyMapping(OneToManyAssociationMetadata $property) |
732 | 732 | { |
733 | 733 | // OneToMany MUST have mappedBy |
734 | - if (! $property->getMappedBy()) { |
|
734 | + if ( ! $property->getMappedBy()) { |
|
735 | 735 | throw MappingException::oneToManyRequiresMappedBy($property->getName()); |
736 | 736 | } |
737 | 737 | |
738 | 738 | if ($property->isOrphanRemoval()) { |
739 | 739 | $cascades = $property->getCascade(); |
740 | 740 | |
741 | - if (! in_array('remove', $cascades, true)) { |
|
741 | + if ( ! in_array('remove', $cascades, true)) { |
|
742 | 742 | $cascades[] = 'remove'; |
743 | 743 | |
744 | 744 | $property->setCascade($cascades); |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | |
762 | 762 | $property->setJoinTable($joinTable); |
763 | 763 | |
764 | - if (! $joinTable->getName()) { |
|
764 | + if ( ! $joinTable->getName()) { |
|
765 | 765 | $joinTableName = $this->namingStrategy->joinTableName( |
766 | 766 | $property->getSourceEntity(), |
767 | 767 | $property->getTargetEntity(), |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | |
774 | 774 | $selfReferencingEntityWithoutJoinColumns = $property->getSourceEntity() === $property->getTargetEntity() && ! $joinTable->hasColumns(); |
775 | 775 | |
776 | - if (! $joinTable->getJoinColumns()) { |
|
776 | + if ( ! $joinTable->getJoinColumns()) { |
|
777 | 777 | $referencedColumnName = $this->namingStrategy->referenceColumnName(); |
778 | 778 | $sourceReferenceName = $selfReferencingEntityWithoutJoinColumns ? 'source' : $referencedColumnName; |
779 | 779 | $columnName = $this->namingStrategy->joinKeyColumnName($property->getSourceEntity(), $sourceReferenceName); |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | $joinTable->addJoinColumn($joinColumn); |
787 | 787 | } |
788 | 788 | |
789 | - if (! $joinTable->getInverseJoinColumns()) { |
|
789 | + if ( ! $joinTable->getInverseJoinColumns()) { |
|
790 | 790 | $referencedColumnName = $this->namingStrategy->referenceColumnName(); |
791 | 791 | $targetReferenceName = $selfReferencingEntityWithoutJoinColumns ? 'target' : $referencedColumnName; |
792 | 792 | $columnName = $this->namingStrategy->joinKeyColumnName($property->getTargetEntity(), $targetReferenceName); |
@@ -801,13 +801,13 @@ discard block |
||
801 | 801 | |
802 | 802 | foreach ($joinTable->getJoinColumns() as $joinColumn) { |
803 | 803 | /** @var JoinColumnMetadata $joinColumn */ |
804 | - if (! $joinColumn->getReferencedColumnName()) { |
|
804 | + if ( ! $joinColumn->getReferencedColumnName()) { |
|
805 | 805 | $joinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
806 | 806 | } |
807 | 807 | |
808 | 808 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
809 | 809 | |
810 | - if (! $joinColumn->getColumnName()) { |
|
810 | + if ( ! $joinColumn->getColumnName()) { |
|
811 | 811 | $columnName = $this->namingStrategy->joinKeyColumnName( |
812 | 812 | $property->getSourceEntity(), |
813 | 813 | $referencedColumnName |
@@ -819,13 +819,13 @@ discard block |
||
819 | 819 | |
820 | 820 | foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) { |
821 | 821 | /** @var JoinColumnMetadata $inverseJoinColumn */ |
822 | - if (! $inverseJoinColumn->getReferencedColumnName()) { |
|
822 | + if ( ! $inverseJoinColumn->getReferencedColumnName()) { |
|
823 | 823 | $inverseJoinColumn->setReferencedColumnName($this->namingStrategy->referenceColumnName()); |
824 | 824 | } |
825 | 825 | |
826 | 826 | $referencedColumnName = $inverseJoinColumn->getReferencedColumnName(); |
827 | 827 | |
828 | - if (! $inverseJoinColumn->getColumnName()) { |
|
828 | + if ( ! $inverseJoinColumn->getColumnName()) { |
|
829 | 829 | $columnName = $this->namingStrategy->joinKeyColumnName( |
830 | 830 | $property->getTargetEntity(), |
831 | 831 | $referencedColumnName |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className); |
860 | 860 | } |
861 | 861 | |
862 | - if (! isset($this->identifier[0])) { |
|
862 | + if ( ! isset($this->identifier[0])) { |
|
863 | 863 | throw MappingException::noIdDefined($this->className); |
864 | 864 | } |
865 | 865 | |
@@ -918,7 +918,7 @@ discard block |
||
918 | 918 | // Association defined as Id field |
919 | 919 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
920 | 920 | |
921 | - if (! $property->isOwningSide()) { |
|
921 | + if ( ! $property->isOwningSide()) { |
|
922 | 922 | $property = $targetClass->getProperty($property->getMappedBy()); |
923 | 923 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
924 | 924 | } |
@@ -932,7 +932,7 @@ discard block |
||
932 | 932 | $columnName = $joinColumn->getColumnName(); |
933 | 933 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
934 | 934 | |
935 | - if (! $joinColumn->getType()) { |
|
935 | + if ( ! $joinColumn->getType()) { |
|
936 | 936 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em)); |
937 | 937 | } |
938 | 938 | |
@@ -966,10 +966,10 @@ discard block |
||
966 | 966 | { |
967 | 967 | $schema = $this->getSchemaName() === null |
968 | 968 | ? '' |
969 | - : $this->getSchemaName() . '_'; |
|
969 | + : $this->getSchemaName().'_'; |
|
970 | 970 | |
971 | 971 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
972 | - return $schema . $this->getTableName() . '_id_tmp'; |
|
972 | + return $schema.$this->getTableName().'_id_tmp'; |
|
973 | 973 | } |
974 | 974 | |
975 | 975 | /** |
@@ -1003,7 +1003,7 @@ discard block |
||
1003 | 1003 | */ |
1004 | 1004 | public function setInheritanceType($type) : void |
1005 | 1005 | { |
1006 | - if (! $this->isInheritanceType($type)) { |
|
1006 | + if ( ! $this->isInheritanceType($type)) { |
|
1007 | 1007 | throw MappingException::invalidInheritanceType($this->className, $type); |
1008 | 1008 | } |
1009 | 1009 | |
@@ -1021,7 +1021,7 @@ discard block |
||
1021 | 1021 | { |
1022 | 1022 | $fieldName = $property->getName(); |
1023 | 1023 | |
1024 | - if (! isset($this->declaredProperties[$fieldName])) { |
|
1024 | + if ( ! isset($this->declaredProperties[$fieldName])) { |
|
1025 | 1025 | throw MappingException::invalidOverrideFieldName($this->className, $fieldName); |
1026 | 1026 | } |
1027 | 1027 | |
@@ -1227,7 +1227,7 @@ discard block |
||
1227 | 1227 | } |
1228 | 1228 | |
1229 | 1229 | if ($inheritedProperty instanceof FieldMetadata) { |
1230 | - if (! $declaringClass->isMappedSuperclass) { |
|
1230 | + if ( ! $declaringClass->isMappedSuperclass) { |
|
1231 | 1231 | $inheritedProperty->setTableName($property->getTableName()); |
1232 | 1232 | } |
1233 | 1233 | |
@@ -1320,11 +1320,11 @@ discard block |
||
1320 | 1320 | 'method' => $methodName, |
1321 | 1321 | ]; |
1322 | 1322 | |
1323 | - if (! class_exists($class)) { |
|
1323 | + if ( ! class_exists($class)) { |
|
1324 | 1324 | throw MappingException::entityListenerClassNotFound($class, $this->className); |
1325 | 1325 | } |
1326 | 1326 | |
1327 | - if (! method_exists($class, $methodName)) { |
|
1327 | + if ( ! method_exists($class, $methodName)) { |
|
1328 | 1328 | throw MappingException::entityListenerMethodNotFound($class, $methodName, $this->className); |
1329 | 1329 | } |
1330 | 1330 | |
@@ -1392,7 +1392,7 @@ discard block |
||
1392 | 1392 | return; |
1393 | 1393 | } |
1394 | 1394 | |
1395 | - if (! (class_exists($className) || interface_exists($className))) { |
|
1395 | + if ( ! (class_exists($className) || interface_exists($className))) { |
|
1396 | 1396 | throw MappingException::invalidClassInDiscriminatorMap($className, $this->className); |
1397 | 1397 | } |
1398 | 1398 |