Skip to content

Commit

Permalink
explicitly define properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Schoch committed Feb 13, 2024
1 parent e9250ed commit 514b457
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Optimizely/OptimizelyConfig/OptimizelyConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class OptimizelyConfigService
*/
private readonly LoggerInterface $logger;

private ProjectConfigInterface $projectConfig;

public function __construct(ProjectConfigInterface $projectConfig, LoggerInterface $logger = null)
{
$this->experiments = $projectConfig->getAllExperiments();
Expand Down
5 changes: 4 additions & 1 deletion src/Optimizely/Utils/CustomAttributeConditionEvaluator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

use Monolog\Logger;
use Optimizely\Enums\CommonAudienceEvaluationLogs as logs;
use Optimizely\Logger\LoggerInterface;
use Optimizely\Utils\SemVersionConditionEvaluator;
use Optimizely\Utils\Validator;

Expand All @@ -44,13 +45,15 @@ class CustomAttributeConditionEvaluator
*/
protected $userAttributes;

private LoggerInterface $logger;

/**
* CustomAttributeConditionEvaluator constructor
*
* @param array $userAttributes Associative array of user attributes to values.
* @param $logger LoggerInterface.
*/
public function __construct(array $userAttributes, $logger)
public function __construct(array $userAttributes, LoggerInterface $logger)
{
$this->userAttributes = $userAttributes;
$this->logger = $logger;
Expand Down

0 comments on commit 514b457

Please sign in to comment.