diff --git a/lib/Doctrine/ORM/EntityManagerInterface.php b/lib/Doctrine/ORM/EntityManagerInterface.php index 31276fe1428..0e7b2a9ed52 100644 --- a/lib/Doctrine/ORM/EntityManagerInterface.php +++ b/lib/Doctrine/ORM/EntityManagerInterface.php @@ -304,7 +304,7 @@ public function hasFilters(); /** * {@inheritDoc} * - * @psalm-param string|class-string $className + * @psalm-param class-string $className * * @return Mapping\ClassMetadata * @psalm-return Mapping\ClassMetadata diff --git a/tests/Doctrine/StaticAnalysis/entity-manager-interface.php b/tests/Doctrine/StaticAnalysis/entity-manager-interface.php new file mode 100644 index 00000000000..02079b47b5d --- /dev/null +++ b/tests/Doctrine/StaticAnalysis/entity-manager-interface.php @@ -0,0 +1,19 @@ + + */ + public function testGetClassMetadata(EntityManagerInterface $entityManager): ClassMetadata + { + return $entityManager->getClassMetadata(\DateTime::class); + } +}