diff --git a/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php b/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php index 228cd875603..00a520dcbc0 100644 --- a/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php +++ b/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php @@ -133,7 +133,7 @@ final class SilentVoidResolver */ private function isStopped($stmt) : bool { - return $stmt instanceof Throw_ || $stmt instanceof Exit_ || $stmt instanceof Return_ || $stmt instanceof Yield_ || $stmt instanceof YieldFrom; + return $stmt instanceof Throw_ || $stmt instanceof Exit_ || $stmt instanceof Return_ && $stmt->expr instanceof Expr || $stmt instanceof Yield_ || $stmt instanceof YieldFrom; } private function isSwitchWithAlwaysReturnOrExit(Switch_ $switch) : bool { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 707835eee04..0682c7c6b92 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'fc250dd8da281cb79f5657d2f5d6c6c0053e54d1'; + public const PACKAGE_VERSION = '82d71724f2e2fff036a859e3fe2589fa82adb633'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-03-24 21:08:05'; + public const RELEASE_DATE = '2024-03-25 15:43:36'; /** * @var int */