From 9369a862b626216fd6fee1f0745dc4a867aaf807 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 31 Mar 2024 19:48:39 +0000 Subject: [PATCH] Updated Rector to commit d86930657fc80c2db725391d1bb8f3ad6a61d96a https://github.com/rectorphp/rector-src/commit/d86930657fc80c2db725391d1bb8f3ad6a61d96a [TypeDeclaration] Handle in inner function on ReturnTypeFromStrictTernaryRector (#5785) --- .../Rector/Class_/ReturnTypeFromStrictTernaryRector.php | 2 +- src/Application/VersionResolver.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/TypeDeclaration/Rector/Class_/ReturnTypeFromStrictTernaryRector.php b/rules/TypeDeclaration/Rector/Class_/ReturnTypeFromStrictTernaryRector.php index a6eb0aa82be..d6920820a5e 100644 --- a/rules/TypeDeclaration/Rector/Class_/ReturnTypeFromStrictTernaryRector.php +++ b/rules/TypeDeclaration/Rector/Class_/ReturnTypeFromStrictTernaryRector.php @@ -96,7 +96,7 @@ CODE_SAMPLE if ($node->stmts === null) { return null; } - $returns = $this->betterNodeFinder->findInstanceOf($node->stmts, Return_::class); + $returns = $this->betterNodeFinder->findInstancesOfInFunctionLikeScoped($node, Return_::class); if (\count($returns) !== 1) { return null; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index e94e64c6e16..d61cbfc6a4c 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 = '4c40eb60ca984574eea3fa75e8ac59e9c8e07e5e'; + public const PACKAGE_VERSION = 'd86930657fc80c2db725391d1bb8f3ad6a61d96a'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-01 02:05:13'; + public const RELEASE_DATE = '2024-04-01 02:46:21'; /** * @var int */