@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $message = "The mapping of field '{$field}' is invalid: The option '{$expectedOption}' is required."; |
285 | 285 | |
286 | 286 | if ( ! empty($hint)) { |
287 | - $message .= ' (Hint: ' . $hint . ')'; |
|
287 | + $message .= ' (Hint: '.$hint.')'; |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | return new self($message); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | */ |
315 | 315 | public static function reflectionFailure($entity, \ReflectionException $previousException) |
316 | 316 | { |
317 | - return new self('An error occurred in ' . $entity, 0, $previousException); |
|
317 | + return new self('An error occurred in '.$entity, 0, $previousException); |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | /** |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | */ |
326 | 326 | public static function joinColumnMustPointToMappedField($className, $joinColumn) |
327 | 327 | { |
328 | - return new self('The column ' . $joinColumn . ' must be mapped to a field in class ' |
|
329 | - . $className . ' since it is referenced by a join column of another class.'); |
|
328 | + return new self('The column '.$joinColumn.' must be mapped to a field in class ' |
|
329 | + . $className.' since it is referenced by a join column of another class.'); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | /** |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | */ |
432 | 432 | public static function noIdDefined($entity) |
433 | 433 | { |
434 | - return new self('No ID defined for entity ' . $entity); |
|
434 | + return new self('No ID defined for entity '.$entity); |
|
435 | 435 | } |
436 | 436 | |
437 | 437 | /** |
@@ -456,12 +456,12 @@ discard block |
||
456 | 456 | public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) |
457 | 457 | { |
458 | 458 | if ( ! empty($path)) { |
459 | - $path = '[' . $path . ']'; |
|
459 | + $path = '['.$path.']'; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | return new self( |
463 | - 'File mapping drivers must have a valid directory path, ' . |
|
464 | - 'however the given path ' . $path . ' seems to be incorrect!' |
|
463 | + 'File mapping drivers must have a valid directory path, '. |
|
464 | + 'however the given path '.$path.' seems to be incorrect!' |
|
465 | 465 | ); |
466 | 466 | } |
467 | 467 | |
@@ -492,11 +492,11 @@ discard block |
||
492 | 492 | public static function duplicateDiscriminatorEntry($className, array $entries, array $map) |
493 | 493 | { |
494 | 494 | return new self( |
495 | - "The entries " . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " . |
|
496 | - "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. " . |
|
497 | - "The entries of the current map are: @DiscriminatorMap({" . implode(', ', array_map( |
|
495 | + "The entries ".implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ". |
|
496 | + "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ". |
|
497 | + "The entries of the current map are: @DiscriminatorMap({".implode(', ', array_map( |
|
498 | 498 | function($a, $b) { return "'$a': '$b'"; }, array_keys($map), array_values($map) |
499 | - )) . "})" |
|
499 | + ))."})" |
|
500 | 500 | ); |
501 | 501 | } |
502 | 502 | |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | public static function illegalOrphanRemoval($className, $field) |
644 | 644 | { |
645 | 645 | return new self("Orphan removal is only allowed on one-to-one and one-to-many ". |
646 | - "associations, but " . $className."#" .$field . " is not."); |
|
646 | + "associations, but ".$className."#".$field." is not."); |
|
647 | 647 | } |
648 | 648 | |
649 | 649 | /** |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | */ |
676 | 676 | public static function noInheritanceOnMappedSuperClass($className) |
677 | 677 | { |
678 | - return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'."); |
|
678 | + return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'."); |
|
679 | 679 | } |
680 | 680 | |
681 | 681 | /** |
@@ -687,8 +687,8 @@ discard block |
||
687 | 687 | public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName) |
688 | 688 | { |
689 | 689 | return new self( |
690 | - "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . |
|
691 | - "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " . |
|
690 | + "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ". |
|
691 | + "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ". |
|
692 | 692 | "to avoid this exception from occurring." |
693 | 693 | ); |
694 | 694 | } |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | */ |
702 | 702 | public static function lifecycleCallbackMethodNotFound($className, $methodName) |
703 | 703 | { |
704 | - return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback."); |
|
704 | + return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback."); |
|
705 | 705 | } |
706 | 706 | |
707 | 707 | /** |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | */ |
748 | 748 | public static function invalidFetchMode($className, $annotation) |
749 | 749 | { |
750 | - return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'"); |
|
750 | + return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'"); |
|
751 | 751 | } |
752 | 752 | |
753 | 753 | /** |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | */ |
758 | 758 | public static function compositeKeyAssignedIdGeneratorRequired($className) |
759 | 759 | { |
760 | - return new self("Entity '". $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
760 | + return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
761 | 761 | } |
762 | 762 | |
763 | 763 | /** |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | */ |
770 | 770 | public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName) |
771 | 771 | { |
772 | - return new self("The target-entity " . $targetEntity . " cannot be found in '" . $sourceEntity."#".$associationName."'."); |
|
772 | + return new self("The target-entity ".$targetEntity." cannot be found in '".$sourceEntity."#".$associationName."'."); |
|
773 | 773 | } |
774 | 774 | |
775 | 775 | /** |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | */ |
782 | 782 | public static function invalidCascadeOption(array $cascades, $className, $propertyName) |
783 | 783 | { |
784 | - $cascades = implode(", ", array_map(function ($e) { return "'" . $e . "'"; }, $cascades)); |
|
784 | + $cascades = implode(", ", array_map(function($e) { return "'".$e."'"; }, $cascades)); |
|
785 | 785 | |
786 | 786 | return new self(sprintf( |
787 | 787 | "You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'", |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | { |
814 | 814 | return new self( |
815 | 815 | sprintf( |
816 | - 'Infinite nesting detected for embedded property %s::%s. ' . |
|
816 | + 'Infinite nesting detected for embedded property %s::%s. '. |
|
817 | 817 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
818 | 818 | $className, |
819 | 819 | $propertyName |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | */ |
827 | 827 | public static function fromLibXmlErrors(array $errors) : self |
828 | 828 | { |
829 | - return new self(implode(PHP_EOL, array_map(function (\LibXMLError $error) : string { |
|
829 | + return new self(implode(PHP_EOL, array_map(function(\LibXMLError $error) : string { |
|
830 | 830 | return sprintf( |
831 | 831 | 'libxml error: %s%s:%d', |
832 | 832 | $error->message, |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | |
166 | 166 | if (isset($xmlRoot['inheritance-type'])) { |
167 | 167 | $inheritanceType = (string) $xmlRoot['inheritance-type']; |
168 | - $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType)); |
|
168 | + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.$inheritanceType)); |
|
169 | 169 | |
170 | 170 | if ($metadata->inheritanceType != Metadata::INHERITANCE_TYPE_NONE) { |
171 | 171 | // Evaluate <discriminator-column...> |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | } |
368 | 368 | |
369 | 369 | if (isset($oneToOneElement['fetch'])) { |
370 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToOneElement['fetch']); |
|
370 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToOneElement['fetch']); |
|
371 | 371 | } |
372 | 372 | |
373 | 373 | if (isset($oneToOneElement['mapped-by'])) { |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | ]; |
417 | 417 | |
418 | 418 | if (isset($oneToManyElement['fetch'])) { |
419 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToManyElement['fetch']); |
|
419 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToManyElement['fetch']); |
|
420 | 420 | } |
421 | 421 | |
422 | 422 | if (isset($oneToManyElement->cascade)) { |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | } |
467 | 467 | |
468 | 468 | if (isset($manyToOneElement['fetch'])) { |
469 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToOneElement['fetch']); |
|
469 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToOneElement['fetch']); |
|
470 | 470 | } |
471 | 471 | |
472 | 472 | if (isset($manyToOneElement['inversed-by'])) { |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | ]; |
509 | 509 | |
510 | 510 | if (isset($manyToManyElement['fetch'])) { |
511 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToManyElement['fetch']); |
|
511 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToManyElement['fetch']); |
|
512 | 512 | } |
513 | 513 | |
514 | 514 | if (isset($manyToManyElement['orphan-removal'])) { |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | |
629 | 629 | // Check for `fetch` |
630 | 630 | if (isset($overrideElement['fetch'])) { |
631 | - $override['fetch'] = constant(Metadata::class . '::FETCH_' . (string) $overrideElement['fetch']); |
|
631 | + $override['fetch'] = constant(Metadata::class.'::FETCH_'.(string) $overrideElement['fetch']); |
|
632 | 632 | } |
633 | 633 | |
634 | 634 | $metadata->setAssociationOverride($fieldName, $override); |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | // Evaluate <lifecycle-callbacks...> |
639 | 639 | if (isset($xmlRoot->{'lifecycle-callbacks'})) { |
640 | 640 | foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { |
641 | - $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string) $lifecycleCallback['type'])); |
|
641 | + $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::'.(string) $lifecycleCallback['type'])); |
|
642 | 642 | } |
643 | 643 | } |
644 | 644 | |
@@ -799,12 +799,12 @@ discard block |
||
799 | 799 | $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null; |
800 | 800 | $usage = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null; |
801 | 801 | |
802 | - if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { |
|
802 | + if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) { |
|
803 | 803 | throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); |
804 | 804 | } |
805 | 805 | |
806 | 806 | if ($usage) { |
807 | - $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); |
|
807 | + $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage); |
|
808 | 808 | } |
809 | 809 | |
810 | 810 | return [ |
@@ -872,7 +872,7 @@ discard block |
||
872 | 872 | $document = new \DOMDocument(); |
873 | 873 | $document->load($file); |
874 | 874 | try { |
875 | - if ( ! $document->schemaValidate(__DIR__ . '/../../../../../doctrine-mapping.xsd')) { |
|
875 | + if ( ! $document->schemaValidate(__DIR__.'/../../../../../doctrine-mapping.xsd')) { |
|
876 | 876 | $errors = libxml_get_errors(); |
877 | 877 | throw MappingException::fromLibXmlErrors($errors); |
878 | 878 | } |