Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions tests/Rules/Functions/ArrayFilterStrictRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand All @@ -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.',
Expand Down