From e56fb5adb0cdaa902b106f4d633ba09fd33da0cc Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 8 Apr 2024 13:19:12 +0000 Subject: [PATCH] Updated Rector to commit 1bbb3faaed01bd234f8e53564d1686529551e75a https://github.com/rectorphp/rector-src/commit/1bbb3faaed01bd234f8e53564d1686529551e75a [TypeDeclaration] Skip maybe not returned on while on ReturnUnionTypeRector (#5812) --- rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php | 2 +- src/Application/VersionResolver.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 */