From d892fdaeb76d79510a4ad2a6d6d6ea51ba8bbd98 Mon Sep 17 00:00:00 2001 From: Fran Moreno Date: Fri, 2 Apr 2021 19:14:32 +0200 Subject: [PATCH] Fix psalm issues --- .../Persistence/Mapping/AbstractClassMetadataFactory.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php b/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php index 6d4de414..e357669c 100644 --- a/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php +++ b/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php @@ -17,6 +17,7 @@ use function array_map; use function array_reverse; use function array_unshift; +use function assert; use function explode; use function sprintf; use function str_replace; @@ -220,6 +221,7 @@ public function getMetadataFor($className) $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); } else { + /** @psalm-var class-string $className */ $realClassName = $this->getRealClass($className); } @@ -489,6 +491,8 @@ private function getRealClass(string $class): string $this->createDefaultProxyClassNameResolver(); } + assert($this->proxyClassNameResolver instanceof ProxyClassNameResolver); + return $this->proxyClassNameResolver->resolveClassName($class); }