From 143d249a1bb4abb88d1a1e524017afc03e587a90 Mon Sep 17 00:00:00 2001 From: spiralbot Date: Tue, 10 Sep 2024 16:57:12 +0000 Subject: [PATCH] Merge pull request #1141: Apply php8.1 in Rector preset --- src/Context/ValueDependency.php | 4 ++-- src/Processor/ContextProcessor.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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) {