diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c33099dee7..6f0a73dd5a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -135,11 +135,6 @@ parameters: count: 2 path: src/EntityManager.php - - - message: "#^Template type T of method Doctrine\\\\ORM\\\\EntityManagerInterface\\:\\:getClassMetadata\\(\\) is not referenced in a parameter\\.$#" - count: 1 - path: src/EntityManagerInterface.php - - message: "#^Method Doctrine\\\\ORM\\\\EntityRepository\\:\\:matching\\(\\) should return Doctrine\\\\Common\\\\Collections\\\\AbstractLazyCollection\\&Doctrine\\\\Common\\\\Collections\\\\Selectable\\ but returns Doctrine\\\\ORM\\\\LazyCriteriaCollection\\<\\(int\\|string\\), object\\>\\.$#" count: 1 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index d04835c1e8..6c70101de1 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -257,12 +257,6 @@ - - wrapped->getClassMetadata($className)]]> - - - - @@ -309,11 +303,9 @@ name ? $entity : null]]> load($sortedId, null, null, [], $lockMode)]]> loadById($sortedId)]]> - metadataFactory->getMetadataFor($className)]]> - diff --git a/src/EntityManagerInterface.php b/src/EntityManagerInterface.php index 326cb933a5..b3b5ddf9e1 100644 --- a/src/EntityManagerInterface.php +++ b/src/EntityManagerInterface.php @@ -340,7 +340,7 @@ public function hasFilters(); * @psalm-param string|class-string $className * * @return Mapping\ClassMetadata - * @psalm-return Mapping\ClassMetadata + * @psalm-return ($className is class-string ? Mapping\ClassMetadata : Mapping\ClassMetadata) * * @psalm-template T of object */