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 */