diff --git a/src/Closures/NoNullableReturnTypeDeclarationRule.php b/src/Closures/NoNullableReturnTypeDeclarationRule.php index cd58ea0b..340f42c2 100644 --- a/src/Closures/NoNullableReturnTypeDeclarationRule.php +++ b/src/Closures/NoNullableReturnTypeDeclarationRule.php @@ -32,7 +32,7 @@ public function processNode( Node $node, Analyser\Scope $scope ): array { - if (!self::hasNullableReturnType($node)) { + if (!self::hasNullableReturnTypeDeclaration($node)) { return []; } @@ -43,7 +43,7 @@ public function processNode( ]; } - private static function hasNullableReturnType(Node\Expr\Closure $node): bool + private static function hasNullableReturnTypeDeclaration(Node\Expr\Closure $node): bool { $returnType = $node->getReturnType();