The expression return static::getClient...iner()->get('doctrine') could return the type null which is incompatible with the type-hinted return Doctrine\Bundle\DoctrineBundle\Registry. Consider adding an additional type-check to rule them out.
Loading history...
30
}
31
32
/**
33
* @param string $class
34
*
35
* @return ObjectRepository|EntityRepository
36
*/
37
public static function getRepository(string $class): ObjectRepository
The expression return static::getDoctri...->getRepository($class) returns the type Doctrine\Persistence\ObjectRepository which includes types incompatible with the type-hinted return Doctrine\Common\Persistence\ObjectRepository.