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

Explicitly define class properties #284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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
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
Loading