diff --git a/src/Methods/NoConstructorParameterWithDefaultValueRule.php b/src/Methods/NoConstructorParameterWithDefaultValueRule.php index cd6f4e81..97aa1d90 100644 --- a/src/Methods/NoConstructorParameterWithDefaultValueRule.php +++ b/src/Methods/NoConstructorParameterWithDefaultValueRule.php @@ -42,7 +42,7 @@ public function processNode( } $params = \array_filter($node->params, static function (Node\Param $node): bool { - return self::hasNullDefaultValue($node); + return self::hasDefaultValue($node); }); if (0 === \count($params)) { @@ -92,7 +92,7 @@ public function processNode( }, $params)); } - private static function hasNullDefaultValue(Node\Param $parameter): bool + private static function hasDefaultValue(Node\Param $parameter): bool { return null !== $parameter->default; }