From b3a15e80166395a73ebbfd7c7a76fcbbe893e03e Mon Sep 17 00:00:00 2001 From: Brown Date: Thu, 14 Nov 2019 14:33:07 -0500 Subject: [PATCH] Fix #2349 - allow suppression of InvalidReturnType for no-return --- .../Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php b/src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php index f30ec486346..5a23cd29274 100644 --- a/src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php @@ -192,7 +192,8 @@ public static function verifyReturnType( $cased_method_id . ' is not expected to return any values but it does, ' . 'either implicitly or explicitly', $return_type_location - ) + ), + $source->getSuppressedIssues() )) { return false; }