diff --git a/rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php b/rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php index 8051fcd209f..06edecc1d86 100644 --- a/rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php +++ b/rules/DeadCode/PhpDoc/DeadReturnTagValueNodeAnalyzer.php @@ -66,7 +66,7 @@ final class DeadReturnTagValueNodeAnalyzer } // 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 6585149445f..9cb057d631a 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 */