From dbfca010ce64df724bf085274d1a1f8e7cd8845d Mon Sep 17 00:00:00 2001 From: spiralbot Date: Tue, 10 Sep 2024 16:56:02 +0000 Subject: [PATCH] Merge pull request #1141: Apply php8.1 in Rector preset --- src/Annotation/Parser.php | 1 + tests/Commands/AbstractCommandsTestCase.php | 2 +- tests/Storage.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Annotation/Parser.php b/src/Annotation/Parser.php index 8f0f861..ddcb439 100644 --- a/src/Annotation/Parser.php +++ b/src/Annotation/Parser.php @@ -20,6 +20,7 @@ public function __construct(string $comment) foreach ($lines as $line) { // strip up comment prefix + /** @var string $line */ $line = \preg_replace('/[\t ]*[\/]?\*[\/]? ?/', '', $line); if (\preg_match('/ *@([^ ]+) (.*)/u', $line, $matches)) { diff --git a/tests/Commands/AbstractCommandsTestCase.php b/tests/Commands/AbstractCommandsTestCase.php index c87da7d..36773e8 100644 --- a/tests/Commands/AbstractCommandsTestCase.php +++ b/tests/Commands/AbstractCommandsTestCase.php @@ -25,7 +25,7 @@ abstract class AbstractCommandsTestCase extends TestCase protected TestApp $app; protected array $buf = []; - private Storage $storage; + private readonly Storage $storage; public function __construct($name = null, array $data = [], $dataName = '') { diff --git a/tests/Storage.php b/tests/Storage.php index 70901e0..c595b08 100644 --- a/tests/Storage.php +++ b/tests/Storage.php @@ -9,7 +9,7 @@ class Storage /** @var array */ protected $storage = []; - public function __construct(private string $dir) + public function __construct(private readonly string $dir) { }