diff --git a/Exception/IndexOrAliasNotFoundException.php b/Exception/IndexOrAliasNotFoundException.php index 84f4177..14adb5a 100644 --- a/Exception/IndexOrAliasNotFoundException.php +++ b/Exception/IndexOrAliasNotFoundException.php @@ -14,11 +14,6 @@ class IndexOrAliasNotFoundException extends Exception */ private $indexOrAlias; - /** - * @var bool - */ - private $isAlias; - /** * Constructor * @@ -30,7 +25,6 @@ class IndexOrAliasNotFoundException extends Exception public function __construct(string $indexOrAlias, bool $isAlias = false, $code = 0, Throwable $previous = null) { $this->indexOrAlias = $indexOrAlias; - $this->isAlias = $isAlias; parent::__construct(sprintf('%s "%s" does not exist', $isAlias ? 'Alias' : 'Index', $indexOrAlias), $code, $previous); } diff --git a/Manager/IndexManagerRegistry.php b/Manager/IndexManagerRegistry.php index 8eef9e2..74dfe8d 100644 --- a/Manager/IndexManagerRegistry.php +++ b/Manager/IndexManagerRegistry.php @@ -6,17 +6,14 @@ use Sineflow\ElasticsearchBundle\Exception\InvalidIndexManagerException; use Sineflow\ElasticsearchBundle\Mapping\DocumentMetadataCollector; use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; /** * Class to get defined index manager services */ class IndexManagerRegistry implements ContainerAwareInterface { - /** - * @var ContainerInterface - */ - private $container; + use ContainerAwareTrait; /** * @var DocumentMetadataCollector @@ -33,16 +30,6 @@ public function __construct(DocumentMetadataCollector $metadataCollector) $this->metadataCollector = $metadataCollector; } - /** - * Sets the Container. - * - * @param ContainerInterface|null $container A ContainerInterface instance or null - */ - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } - /** * Returns the index manager service for a given index manager name *