From a210f202ea4ec62e31c2eeb7344f6f94eb739b3f Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 15 Sep 2024 01:23:46 +0000 Subject: [PATCH] Updated Rector to commit 5c30f2491c3fb03ff38fbc524a02b9baa2e3f96c https://github.com/rectorphp/rector-src/commit/5c30f2491c3fb03ff38fbc524a02b9baa2e3f96c [Performance] Reduce double traverse on AddNeverReturnType (#6305) --- rules/TypeDeclaration/NodeManipulator/AddNeverReturnType.php | 5 +---- src/Application/VersionResolver.php | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/rules/TypeDeclaration/NodeManipulator/AddNeverReturnType.php b/rules/TypeDeclaration/NodeManipulator/AddNeverReturnType.php index 4d87638c7c9..285a93f40c0 100644 --- a/rules/TypeDeclaration/NodeManipulator/AddNeverReturnType.php +++ b/rules/TypeDeclaration/NodeManipulator/AddNeverReturnType.php @@ -96,10 +96,7 @@ private function shouldSkip($node, Scope $scope) : bool */ private function hasReturnOrYields($node) : bool { - if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($node, Return_::class)) { - return \true; - } - return $this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($node, \array_merge([Yield_::class, YieldFrom::class], ControlStructure::CONDITIONAL_NODE_SCOPE_TYPES)); + return $this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($node, \array_merge([Return_::class, Yield_::class, YieldFrom::class], ControlStructure::CONDITIONAL_NODE_SCOPE_TYPES)); } /** * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_|\PhpParser\Node\Expr\Closure $node diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 4e66b8754aa..62229caceb4 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 = '5da2f3302522508e64b7b74e649f06e45f7b70db'; + public const PACKAGE_VERSION = '5c30f2491c3fb03ff38fbc524a02b9baa2e3f96c'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-09-15 08:12:52'; + public const RELEASE_DATE = '2024-09-15 08:21:32'; /** * @var int */