From b38be7ab0689d5f5442e935753821fe76d92a470 Mon Sep 17 00:00:00 2001 From: Juan Cruz Vincenti Date: Wed, 13 Dec 2023 12:32:22 -0300 Subject: [PATCH] PHP82-66: Remove all dynamic properties --- src/ConfigurationIndex.php | 15 +++++++++++++++ src/IndexRotator.php | 7 ++++++- src/Strategy/AliasStrategy.php | 16 ++++++++++++++++ src/Strategy/ConfigurationStrategy.php | 16 ++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/ConfigurationIndex.php b/src/ConfigurationIndex.php index 0fe02b8..cd471ca 100644 --- a/src/ConfigurationIndex.php +++ b/src/ConfigurationIndex.php @@ -11,6 +11,21 @@ class ConfigurationIndex const TYPE_CONFIGURATION = 'configuration'; const PRIMARY_ID = 'primary'; + /** + * @var \Elasticsearch\Client + */ + private $engine; + + /** + * @var \Psr\Log\LoggerInterface + */ + private $logger; + + /** + * @var string + */ + private $configurationIndexName; + /** * Mapping for configuration index. * diff --git a/src/IndexRotator.php b/src/IndexRotator.php index fee9a10..525065e 100644 --- a/src/IndexRotator.php +++ b/src/IndexRotator.php @@ -38,6 +38,11 @@ class IndexRotator */ private $primaryIndexStrategy; + /** + * @var \Psr\Log\LoggerInterface + */ + private $logger; + /** * Constructor. * @@ -45,7 +50,7 @@ class IndexRotator * @param string $prefix Identifier for who's configuration this is intended. * @param Psr\Log\LoggerInterface $logger */ - public function __construct(\Elasticsearch\Client $engine, $prefix, LoggerInterface $logger = null) + public function __construct(Client $engine, $prefix, LoggerInterface $logger = null) { $this->engine = $engine; $this->logger = $logger ?: new NullLogger(); diff --git a/src/Strategy/AliasStrategy.php b/src/Strategy/AliasStrategy.php index bf5f2ba..7bc4cf5 100644 --- a/src/Strategy/AliasStrategy.php +++ b/src/Strategy/AliasStrategy.php @@ -10,6 +10,22 @@ class AliasStrategy implements PrimaryIndexStrategy { + + /** + * @var \Elasticsearch\Client + */ + private $engine; + + /** + * @var \Psr\Log\LoggerInterface + */ + private $logger; + + /** + * @var array + */ + private $options; + /** * Constructor. * diff --git a/src/Strategy/ConfigurationStrategy.php b/src/Strategy/ConfigurationStrategy.php index 5deecea..e7da764 100644 --- a/src/Strategy/ConfigurationStrategy.php +++ b/src/Strategy/ConfigurationStrategy.php @@ -11,6 +11,22 @@ class ConfigurationStrategy implements PrimaryIndexStrategy { + + /** + * @var \Elasticsearch\Client + */ + private $engine; + + /** + * @var \Psr\Log\LoggerInterface + */ + private $logger; + + /** + * @var array + */ + private $options; + /** * Constructor. *