Skip to content

Commit

Permalink
#1112 - Yoday need you may, better IDE hinting as well needed is.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Aug 18, 2014
1 parent 19d3552 commit bf03694
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ public function getRepository(EntityManagerInterface $entityManager, $entityName
*/
protected function createRepository(EntityManagerInterface $entityManager, $entityName)
{
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
$metadata = $entityManager->getClassMetadata($entityName);
$repositoryClassName = $metadata->customRepositoryClassName;

if ($repositoryClassName === null) {
if (null === $repositoryClassName) {
$configuration = $entityManager->getConfiguration();
$repositoryClassName = $configuration->getDefaultRepositoryClassName();
}
Expand Down

0 comments on commit bf03694

Please sign in to comment.