From 2758314ab6e85e1f51b7e91a357ffdd99f18089b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= <am@localheinz.com> Date: Fri, 13 Dec 2024 09:42:28 +0100 Subject: [PATCH] Fix: Rename parameter --- src/Methods/NoParameterWithNullDefaultValueRule.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Methods/NoParameterWithNullDefaultValueRule.php b/src/Methods/NoParameterWithNullDefaultValueRule.php index 575a49e9..16deaa3d 100644 --- a/src/Methods/NoParameterWithNullDefaultValueRule.php +++ b/src/Methods/NoParameterWithNullDefaultValueRule.php @@ -51,9 +51,9 @@ public function processNode( $classReflection = $scope->getClassReflection(); if ($classReflection->isAnonymous()) { - return \array_values(\array_map(static function (Node\Param $node) use ($methodName): Rules\RuleError { + return \array_values(\array_map(static function (Node\Param $parameterWithNullDefaultValue) use ($methodName): Rules\RuleError { /** @var Node\Expr\Variable $variable */ - $variable = $node->var; + $variable = $parameterWithNullDefaultValue->var; /** @var string $parameterName */ $parameterName = $variable->name; @@ -72,9 +72,9 @@ public function processNode( $className = $classReflection->getName(); - return \array_values(\array_map(static function (Node\Param $node) use ($className, $methodName): Rules\RuleError { + return \array_values(\array_map(static function (Node\Param $parameterWithNullDefaultValue) use ($className, $methodName): Rules\RuleError { /** @var Node\Expr\Variable $variable */ - $variable = $node->var; + $variable = $parameterWithNullDefaultValue->var; /** @var string $parameterName */ $parameterName = $variable->name;