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 2b1d14f commit 7e89311
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Methods/NoParameterWithNullDefaultValueRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ 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 {
return self::hasNullDefaultValue($node);
});

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

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

$className = $classReflection->getName();
Expand All @@ -89,7 +89,7 @@ public function processNode(
return Rules\RuleErrorBuilder::message($message)
->identifier(ErrorIdentifier::noParameterWithNullDefaultValue()->toString())
->build();
}, $params));
}, $parametersWithNullDefaultValue));
}

private static function hasNullDefaultValue(Node\Param $node): bool
Expand Down

0 comments on commit 7e89311

Please sign in to comment.