diff --git a/src/Type/Php/ArrayMapFunctionReturnTypeExtension.php b/src/Type/Php/ArrayMapFunctionReturnTypeExtension.php index b58638dddf..f0ad5c8472 100644 --- a/src/Type/Php/ArrayMapFunctionReturnTypeExtension.php +++ b/src/Type/Php/ArrayMapFunctionReturnTypeExtension.php @@ -46,7 +46,8 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection, $callback = $functionCall->getArgs()[0]->value; $callableType = $scope->getType($callback); $callableIsNull = $callableType->isNull()->yes(); - + $x = !$callableType->isNull()->no(); + if ($callableType->isCallable()->yes()) { $valueType = $scope->getType(new FuncCall( $callback,