Skip to content

Commit

Permalink
The container is always set (#1128)
Browse files Browse the repository at this point in the history
The container is always set
  • Loading branch information
ostrolucky committed Jan 20, 2020
2 parents bb1ac0d + 2834c4b commit a3828da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Repository/ContainerRepositoryFactory.php
Expand Up @@ -18,7 +18,7 @@ final class ContainerRepositoryFactory implements RepositoryFactory
/** @var ObjectRepository[] */
private $managedRepositories = [];

/** @var ContainerInterface|null */
/** @var ContainerInterface */
private $container;

/**
Expand All @@ -40,7 +40,7 @@ public function getRepository(EntityManagerInterface $entityManager, $entityName
$customRepositoryName = $metadata->customRepositoryClassName;
if ($customRepositoryName !== null) {
// fetch from the container
if ($this->container && $this->container->has($customRepositoryName)) {
if ($this->container->has($customRepositoryName)) {
$repository = $this->container->get($customRepositoryName);

if (! $repository instanceof ObjectRepository) {
Expand Down

0 comments on commit a3828da

Please sign in to comment.