Skip to content

Commit

Permalink
PHP82-66: Remove all dynamic properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Cruz Vincenti committed Dec 13, 2023
1 parent e47ff6b commit 3973939
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/ConfigurationIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
7 changes: 6 additions & 1 deletion src/IndexRotator.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,19 @@ class IndexRotator
*/
private $primaryIndexStrategy;

/**
* @var \Psr\Log\LoggerInterface
*/
private $logger;

/**
* Constructor.
*
* @param \Elasticsearch\Client $engine
* @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();
Expand Down
16 changes: 16 additions & 0 deletions src/Strategy/AliasStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@

class AliasStrategy implements PrimaryIndexStrategy
{

/**
* @var \Elasticsearch\Client
*/
private $engine;

/**
* @var \Psr\Log\LoggerInterface
*/
private $logger;

/**
* @var array
*/
private $options;

/**
* Constructor.
*
Expand Down
16 changes: 16 additions & 0 deletions src/Strategy/ConfigurationStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@

class ConfigurationStrategy implements PrimaryIndexStrategy
{

/**
* @var \Elasticsearch\Client
*/
private $engine;

/**
* @var \Psr\Log\LoggerInterface
*/
private $logger;

/**
* @var array
*/
private $options;

/**
* Constructor.
*
Expand Down

0 comments on commit 3973939

Please sign in to comment.