diff --git a/src/Methods/NoParameterWithNullableTypeDeclarationRule.php b/src/Methods/NoParameterWithNullableTypeDeclarationRule.php index c93c15cc..b8b68079 100644 --- a/src/Methods/NoParameterWithNullableTypeDeclarationRule.php +++ b/src/Methods/NoParameterWithNullableTypeDeclarationRule.php @@ -37,11 +37,11 @@ public function processNode( return []; } - $params = \array_filter($node->params, static function (Node\Param $node): bool { + $parametersWithNullableTypeDeclaration = \array_filter($node->params, static function (Node\Param $node): bool { return self::isNullable($node); }); - if (0 === \count($params)) { + if (0 === \count($parametersWithNullableTypeDeclaration)) { return []; } @@ -67,7 +67,7 @@ public function processNode( return Rules\RuleErrorBuilder::message($message) ->identifier(ErrorIdentifier::noParameterWithContainerTypeDeclaration()->toString()) ->build(); - }, $params)); + }, $parametersWithNullableTypeDeclaration)); } $className = $classReflection->getName(); @@ -89,7 +89,7 @@ public function processNode( return Rules\RuleErrorBuilder::message($message) ->identifier(ErrorIdentifier::noParameterWithContainerTypeDeclaration()->toString()) ->build(); - }, $params)); + }, $parametersWithNullableTypeDeclaration)); } private static function isNullable(Node\Param $node): bool