Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP82-66: Remove all dynamic properties #8

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading