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 d6250d5 commit 514a9b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Methods/NoConstructorParameterWithDefaultValueRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public function processNode(
$classReflection = $scope->getClassReflection();

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

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

$className = $classReflection->getName();

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

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

0 comments on commit 514a9b2

Please sign in to comment.