Skip to content

Commit 11b6403

Browse files
staabmondrejmirtes
authored andcommitted
Simplify tests in which treatPhpDocTypesAsCertain is always true
1 parent b043bd8 commit 11b6403

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/Rules/Functions/ArrayFilterStrictRuleTest.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,20 @@
1111
class ArrayFilterStrictRuleTest extends RuleTestCase
1212
{
1313

14-
private bool $treatPhpDocTypesAsCertain;
15-
1614
private bool $checkNullables;
1715

1816
protected function getRule(): Rule
1917
{
2018
return new ArrayFilterStrictRule(
2119
$this->createReflectionProvider(),
22-
$this->treatPhpDocTypesAsCertain,
20+
$this->shouldTreatPhpDocTypesAsCertain(),
2321
$this->checkNullables,
2422
true,
2523
);
2624
}
2725

28-
protected function shouldTreatPhpDocTypesAsCertain(): bool
29-
{
30-
return $this->treatPhpDocTypesAsCertain;
31-
}
32-
3326
public function testRule(): void
3427
{
35-
$this->treatPhpDocTypesAsCertain = true;
3628
$this->checkNullables = true;
3729
$this->analyse([__DIR__ . '/data/array-filter-strict.php'], [
3830
[
@@ -60,7 +52,6 @@ public function testRule(): void
6052

6153
public function testRuleAllowMissingCallbackInSomeCases(): void
6254
{
63-
$this->treatPhpDocTypesAsCertain = true;
6455
$this->checkNullables = true;
6556
$this->analyse([__DIR__ . '/data/array-filter-allow.php'], [
6657
[

0 commit comments

Comments
 (0)