From ee373e619a2ed6c572a1548d89abbec32536ed2a Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 4 Dec 2023 01:56:17 +0000 Subject: [PATCH] Updated Rector to commit 41729c25cb33ec5219433d5e101d6d54ed4045a2 https://github.com/rectorphp/rector-src/commit/41729c25cb33ec5219433d5e101d6d54ed4045a2 [DeadCode] Skip @return never with void on RemoveUselessReturnTagRector (#5320) --- rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php | 2 +- src/Application/VersionResolver.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php b/rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php index 8051fcd209f1..06edecc1d862 100644 --- a/rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php +++ b/rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php @@ -66,7 +66,7 @@ public function isDead(ReturnTagValueNode $returnTagValueNode, ClassMethod $clas } // in case of void, there is no added value in @return tag if ($returnType instanceof Identifier && $returnType->toString() === 'void') { - return \true; + return !$returnTagValueNode->type instanceof IdentifierTypeNode || (string) $returnTagValueNode->type !== 'never'; } if (!$this->typeComparator->arePhpParserAndPhpStanPhpDocTypesEqual($returnType, $returnTagValueNode->type, $classMethod)) { return $returnTagValueNode->type instanceof IdentifierTypeNode && (string) $returnTagValueNode->type === 'void'; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 6585149445f3..9cb057d631a8 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 = '8e6d46a58fff8e6bd5276b9ae473bfb91460b487'; + public const PACKAGE_VERSION = '41729c25cb33ec5219433d5e101d6d54ed4045a2'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-12-03 20:10:35'; + public const RELEASE_DATE = '2023-12-04 08:54:10'; /** * @var int */