Skip to content

Commit

Permalink
fixup! Fixed issues reported by phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Oct 3, 2023
1 parent d9a5eaa commit 4de3f25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/bundle/ApiLoader/BoostFactorProviderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider;
use Ibexa\Solr\FieldMapper\BoostFactorProvider;
use LogicException;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

Expand Down Expand Up @@ -50,7 +51,7 @@ public function __construct(
public function buildService()
{
if ($this->container === null) {
return new BoostFactorProvider();
throw new LogicException(sprintf('Unable to build %s due to missing container reference', BoostFactorProvider::class));
}

$repositoryConfig = $this->repositoryConfigurationProvider->getRepositoryConfig();
Expand Down
3 changes: 2 additions & 1 deletion src/bundle/ApiLoader/IndexingDepthProviderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider;
use Ibexa\Solr\FieldMapper\IndexingDepthProvider;
use LogicException;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

Expand Down Expand Up @@ -45,7 +46,7 @@ public function __construct(
public function buildService()
{
if ($this->container === null) {
return new IndexingDepthProvider();
throw new LogicException(sprintf('Unable to build %s due to missing container reference', IndexingDepthProvider::class));
}

$repositoryConfig = $this->repositoryConfigurationProvider->getRepositoryConfig();
Expand Down

0 comments on commit 4de3f25

Please sign in to comment.