diff --git a/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php b/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php index b1f5fe37338..db367d0aa1c 100644 --- a/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php +++ b/rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php @@ -153,7 +153,7 @@ final class SilentVoidResolver if (!$this->hasStmtsAlwaysReturnOrExit($stmt->stmts)) { return \false; } - return !$this->isFoundLoopControl($stmt); + return $stmt instanceof Do_ && !$this->isFoundLoopControl($stmt); } /** * @param \PhpParser\Node\Stmt|\PhpParser\Node\Expr $stmt diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 37982a0bc39..af9af09b87b 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 = '54e2e110d506d6e06e45cb808ce87824306ddd4f'; + public const PACKAGE_VERSION = '1bbb3faaed01bd234f8e53564d1686529551e75a'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-08 14:20:29'; + public const RELEASE_DATE = '2024-04-08 20:16:33'; /** * @var int */