The expression return $this->getEntityM...>getObjectClass($data)) returns the type Doctrine\Persistence\Mapping\ClassMetadata which includes types incompatible with the type-hinted return Doctrine\ORM\Mapping\ClassMetadata.
Loading history...
42
}
43
44
7
private function getEntityManager(object $data): EntityManagerInterface
45
{
46
7
if (!$this->registry) {
47
throw new BadMethodCallException('initRegistry should be called first. Registry property does not exist');