Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e861638

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

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎tests/Rules/Functions/ArrayFilterStrictRuleTest.php

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

14-
private bool $checkNullables;
15-
1614
protected function getRule(): Rule
1715
{
1816
return new ArrayFilterStrictRule(
1917
$this->createReflectionProvider(),
2018
$this->shouldTreatPhpDocTypesAsCertain(),
21-
$this->checkNullables,
19+
true,
2220
true,
2321
);
2422
}
2523

2624
public function testRule(): void
2725
{
28-
$this->checkNullables = true;
2926
$this->analyse([__DIR__ . '/data/array-filter-strict.php'], [
3027
[
3128
'Call to function array_filter() requires parameter #2 to be passed to avoid loose comparison semantics.',
@@ -52,7 +49,6 @@ public function testRule(): void
5249

5350
public function testRuleAllowMissingCallbackInSomeCases(): void
5451
{
55-
$this->checkNullables = true;
5652
$this->analyse([__DIR__ . '/data/array-filter-allow.php'], [
5753
[
5854
'Call to function array_filter() requires parameter #2 to be passed to avoid loose comparison semantics.',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /