diff --git a/composer.json b/composer.json index 18b72aa..f45aa6a 100644 --- a/composer.json +++ b/composer.json @@ -27,9 +27,9 @@ "cdn77/coding-standard": "^7.0", "infection/infection": "^0.29.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1" + "phpstan/phpstan": "^2", + "phpstan/phpstan-phpunit": "^2", + "phpstan/phpstan-strict-rules": "^2" }, "config": { "allow-plugins": { diff --git a/src/TestCheck/EveryTestHasGroup.php b/src/TestCheck/EveryTestHasGroup.php index 78aa448..56aaecd 100644 --- a/src/TestCheck/EveryTestHasGroup.php +++ b/src/TestCheck/EveryTestHasGroup.php @@ -48,6 +48,7 @@ public function run(TestCase $testCaseContext): void continue; } + /** @var array $groups */ $groups = array_map( static fn ($groupAttribute) => $groupAttribute->getArguments()[0], $classReflection->getAttributes(Group::class), diff --git a/tests/StubTest.php b/tests/StubTest.php index 2c97aaa..c5bf365 100644 --- a/tests/StubTest.php +++ b/tests/StubTest.php @@ -18,7 +18,7 @@ public function testValueIsDefaultWhenNotSet(): void $stub = Stub::create(SimpleClass::class); - $stub->getProperty1(); + $x = $stub->getProperty1(); } public function testPropertyIsSetBypassingConstructor(): void