From 06af927f128d5a302a1bedd32125d9066fd86def Mon Sep 17 00:00:00 2001 From: orklah Date: Mon, 26 Jul 2021 23:09:27 +0200 Subject: [PATCH] fix an error I made a few months ago --- .../Internal/Analyzer/FunctionLike/ReturnTypeCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeCollector.php b/src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeCollector.php index 5e0c9159fb4..e2d9c3600ec 100644 --- a/src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeCollector.php +++ b/src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeCollector.php @@ -44,7 +44,7 @@ public static function getReturnTypes( } elseif ($stmt->expr instanceof PhpParser\Node\Scalar\String_) { $return_types[] = Type::getString(); } elseif ($stmt->expr instanceof PhpParser\Node\Scalar\LNumber) { - $return_types[] = Type::getString(); + $return_types[] = Type::getInt(); } elseif ($stmt->expr instanceof PhpParser\Node\Expr\ConstFetch) { if ((string)$stmt->expr->name === 'true') { $return_types[] = Type::getTrue();