diff --git a/src/Context/ValueDependency.php b/src/Context/ValueDependency.php index 45bec1a8..67f1fc78 100644 --- a/src/Context/ValueDependency.php +++ b/src/Context/ValueDependency.php @@ -11,11 +11,11 @@ */ final class ValueDependency implements DependencyInterface { - private array $variants; + private readonly array $variants; public function __construct( private readonly string $name, - private mixed $value, + private readonly mixed $value, array $variants = null ) { $this->variants = $variants ?? [$value]; diff --git a/src/Processor/ContextProcessor.php b/src/Processor/ContextProcessor.php index c896c4cc..01ed7cb3 100644 --- a/src/Processor/ContextProcessor.php +++ b/src/Processor/ContextProcessor.php @@ -17,7 +17,7 @@ final class ContextProcessor implements ProcessorInterface // Context injection pattern @{key|default} private const PATTERN = '/@\\{(?P[a-z0-9_\\.\\-]+)(?: *\\| *(?P[^}]+))?}/i'; - private string $pattern; + private readonly string $pattern; public function __construct(string $pattern = null) {