From 796462961dd33bc9c56bb2b8fbc31940ee3e99a1 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 1 Dec 2022 20:18:07 +0100 Subject: [PATCH] Fix --- .../Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php b/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php index 213fe4ca152..2f85c7aa034 100644 --- a/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php +++ b/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php @@ -102,7 +102,7 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev } } - if (count($array_arg_types) === 1) { + if (count($orig_types) === 1) { return $orig_types[0]; }