#1112 - Elvis operator reduces code duplication even more
This commit is contained in:
parent
bf03694e28
commit
aab7fce2d4
1 changed files with 2 additions and 6 deletions
|
@ -62,12 +62,8 @@ class DefaultRepositoryFactory implements RepositoryFactory
|
|||
{
|
||||
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
|
||||
$metadata = $entityManager->getClassMetadata($entityName);
|
||||
$repositoryClassName = $metadata->customRepositoryClassName;
|
||||
|
||||
if (null === $repositoryClassName) {
|
||||
$configuration = $entityManager->getConfiguration();
|
||||
$repositoryClassName = $configuration->getDefaultRepositoryClassName();
|
||||
}
|
||||
$repositoryClassName = $metadata->customRepositoryClassName
|
||||
?: $entityManager->getConfiguration()->getDefaultRepositoryClassName();
|
||||
|
||||
return new $repositoryClassName($entityManager, $metadata);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue