From 88d1487e2a0600013485374a271cdb44ef5b5ceb Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 1 Sep 2025 17:45:43 +0200 Subject: [PATCH] Simplify tests in which checkNullables is always true --- tests/Rules/Functions/ArrayFilterStrictRuleTest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/Rules/Functions/ArrayFilterStrictRuleTest.php b/tests/Rules/Functions/ArrayFilterStrictRuleTest.php index e2c989c..d5c5e3c 100644 --- a/tests/Rules/Functions/ArrayFilterStrictRuleTest.php +++ b/tests/Rules/Functions/ArrayFilterStrictRuleTest.php @@ -11,21 +11,18 @@ class ArrayFilterStrictRuleTest extends RuleTestCase { - private bool $checkNullables; - protected function getRule(): Rule { return new ArrayFilterStrictRule( $this->createReflectionProvider(), $this->shouldTreatPhpDocTypesAsCertain(), - $this->checkNullables, + true, true, ); } public function testRule(): void { - $this->checkNullables = true; $this->analyse([__DIR__ . '/data/array-filter-strict.php'], [ [ 'Call to function array_filter() requires parameter #2 to be passed to avoid loose comparison semantics.', @@ -52,7 +49,6 @@ public function testRule(): void public function testRuleAllowMissingCallbackInSomeCases(): void { - $this->checkNullables = true; $this->analyse([__DIR__ . '/data/array-filter-allow.php'], [ [ 'Call to function array_filter() requires parameter #2 to be passed to avoid loose comparison semantics.',