From 3973939bb8b94a0daf23d3d9459ea10e7928d9f6 Mon Sep 17 00:00:00 2001 From: Juan Cruz Vincenti Date: Wed, 13 Dec 2023 11:46:35 -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. *