Skip to content

Commit

Permalink
Fix: Rename parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 13, 2024
1 parent 5eec667 commit 20aabf4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Methods/NoParameterWithNullableTypeDeclarationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public function processNode(
$classReflection = $scope->getClassReflection();

if ($classReflection->isAnonymous()) {
return \array_map(static function (Node\Param $node) use ($methodName): Rules\RuleError {
return \array_map(static function (Node\Param $parameterWithNullableTypeDeclaration) use ($methodName): Rules\RuleError {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;
$variable = $parameterWithNullableTypeDeclaration->var;

/** @var string $parameterName */
$parameterName = $variable->name;
Expand All @@ -72,9 +72,9 @@ public function processNode(

$className = $classReflection->getName();

return \array_map(static function (Node\Param $node) use ($className, $methodName): Rules\RuleError {
return \array_map(static function (Node\Param $parameterWithNullableTypeDeclaration) use ($className, $methodName): Rules\RuleError {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;
$variable = $parameterWithNullableTypeDeclaration->var;

/** @var string $parameterName */
$parameterName = $variable->name;
Expand Down

0 comments on commit 20aabf4

Please sign in to comment.