Skip to content

Commit

Permalink
Fix: Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 13, 2024
1 parent a7add5f commit 5063cae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Closures/NoParameterWithNullDefaultValueRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public function processNode(
return [];
}

$params = \array_filter($node->params, static function (Node\Param $node): bool {
$parametersWithNullDefaultValue = \array_filter($node->params, static function (Node\Param $node): bool {
if (!$node->default instanceof Node\Expr\ConstFetch) {
return false;
}

return 'null' === $node->default->name->toLowerString();
});

if (0 === \count($params)) {
if (0 === \count($parametersWithNullDefaultValue)) {
return [];
}

Expand All @@ -63,6 +63,6 @@ public function processNode(
return Rules\RuleErrorBuilder::message($message)
->identifier(ErrorIdentifier::noParameterWithNullDefaultValue()->toString())
->build();
}, $params));
}, $parametersWithNullDefaultValue));
}
}

0 comments on commit 5063cae

Please sign in to comment.