From b20472468da57ddcd0639868518ba486c7d71bfc Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sun, 31 Aug 2025 09:14:53 +0200 Subject: [PATCH] Simplify tests in which treatPhpDocTypesAsCertain is always true --- tests/Rules/Functions/ArrayFilterStrictRuleTest.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/Rules/Functions/ArrayFilterStrictRuleTest.php b/tests/Rules/Functions/ArrayFilterStrictRuleTest.php index 4ef5448..e2c989c 100644 --- a/tests/Rules/Functions/ArrayFilterStrictRuleTest.php +++ b/tests/Rules/Functions/ArrayFilterStrictRuleTest.php @@ -11,28 +11,20 @@ class ArrayFilterStrictRuleTest extends RuleTestCase { - private bool $treatPhpDocTypesAsCertain; - private bool $checkNullables; protected function getRule(): Rule { return new ArrayFilterStrictRule( $this->createReflectionProvider(), - $this->treatPhpDocTypesAsCertain, + $this->shouldTreatPhpDocTypesAsCertain(), $this->checkNullables, true, ); } - protected function shouldTreatPhpDocTypesAsCertain(): bool - { - return $this->treatPhpDocTypesAsCertain; - } - public function testRule(): void { - $this->treatPhpDocTypesAsCertain = true; $this->checkNullables = true; $this->analyse([__DIR__ . '/data/array-filter-strict.php'], [ [ @@ -60,7 +52,6 @@ public function testRule(): void public function testRuleAllowMissingCallbackInSomeCases(): void { - $this->treatPhpDocTypesAsCertain = true; $this->checkNullables = true; $this->analyse([__DIR__ . '/data/array-filter-allow.php'], [ [