Doctrine/RepositoryFinder.php
public function getRepository($className)
    {
        $entityManager = $this->doctrine->getManagerForClass($className);
        if (!$entityManager instanceof EntityManagerInterface) {
            throw new \UnexpectedValueException("No manager found for class {$className}");
        }
        $repository = $entityManager->getRepository($className);
        if (!$repository instanceof EntityRepository) {
            throw new \UnexpectedValueException("No repository found for class {$className}");
        }

        return $repository;
    }
public function getRepository($className)
    {
        $entityManager = $this->doctrine->getManagerForClass($className);
        if (!$entityManager instanceof EntityManagerInterface) {
            throw new \UnexpectedValueException("No manager found for class {$className}");
        }
        $repository = $entityManager->getRepository($className);
        if (!$repository instanceof EntityRepository) {
            throw new \UnexpectedValueException("No repository found for class {$className}");
        }

        return $repository;
    }
@param string $className

@return EntityRepository