From 4f597a270154536bcb6da8637608046d35e3910c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 14 Jan 2023 13:35:48 +0100 Subject: [PATCH] Reuse association mapping array shape --- lib/Doctrine/ORM/ORMInvalidArgumentException.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/ORMInvalidArgumentException.php b/lib/Doctrine/ORM/ORMInvalidArgumentException.php index 62b406a3dd4..4d207f63844 100644 --- a/lib/Doctrine/ORM/ORMInvalidArgumentException.php +++ b/lib/Doctrine/ORM/ORMInvalidArgumentException.php @@ -6,6 +6,7 @@ use Doctrine\Deprecations\Deprecation; use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Mapping\ClassMetadataInfo; use InvalidArgumentException; use function array_map; @@ -22,6 +23,8 @@ /** * Contains exception messages for all invalid lifecycle state exceptions inside UnitOfWork + * + * @psalm-import-type AssociationMapping from ClassMetadataInfo */ class ORMInvalidArgumentException extends InvalidArgumentException { @@ -109,7 +112,7 @@ static function (array $newEntityWithAssociation): string { /** * @param object $entry - * @psalm-param array $associationMapping + * @psalm-param AssociationMapping $associationMapping * * @return ORMInvalidArgumentException */ @@ -271,7 +274,7 @@ private static function objToStr($obj): string /** * @param object $entity - * @psalm-param array $associationMapping + * @psalm-param AssociationMapping $associationMapping */ private static function newEntityFoundThroughRelationshipMessage(array $associationMapping, $entity): string {