From 9f2e48fa077c99f11b65542450f759b10eb6a0e7 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 3 Apr 2024 05:02:11 +0000 Subject: [PATCH] Updated Rector to commit 9b4ad93acd680c5da9a3bab4d5e1f46ad5905b7f https://github.com/rectorphp/rector-src/commit/9b4ad93acd680c5da9a3bab4d5e1f46ad5905b7f Fix removal of useless @param tag when string|null insteadof ?string is used. (#5684) --- rules/DeadCode/PhpDoc/TagRemover/ParamTagRemover.php | 4 ---- src/Application/VersionResolver.php | 4 ++-- src/NodeTypeResolver/PHPStan/TypeHasher.php | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/rules/DeadCode/PhpDoc/TagRemover/ParamTagRemover.php b/rules/DeadCode/PhpDoc/TagRemover/ParamTagRemover.php index 1fc7785cf89..e526348036e 100644 --- a/rules/DeadCode/PhpDoc/TagRemover/ParamTagRemover.php +++ b/rules/DeadCode/PhpDoc/TagRemover/ParamTagRemover.php @@ -44,10 +44,6 @@ final class ParamTagRemover if ($docNode->name !== '@param') { return null; } - // skip union types - if ($docNode->value->type instanceof UnionTypeNode) { - return null; - } if (!$this->deadParamTagValueNodeAnalyzer->isDead($docNode->value, $functionLike)) { return null; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index ff5ee1dfb5d..e03fd20035d 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 = 'b925e54b913863053e57e628ea95b2fd612e128e'; + public const PACKAGE_VERSION = '9b4ad93acd680c5da9a3bab4d5e1f46ad5905b7f'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-03 11:17:08'; + public const RELEASE_DATE = '2024-04-03 11:59:45'; /** * @var int */ diff --git a/src/NodeTypeResolver/PHPStan/TypeHasher.php b/src/NodeTypeResolver/PHPStan/TypeHasher.php index 1861386a86c..aeea6951d9c 100644 --- a/src/NodeTypeResolver/PHPStan/TypeHasher.php +++ b/src/NodeTypeResolver/PHPStan/TypeHasher.php @@ -75,7 +75,7 @@ final class TypeHasher } $normalizedUnionType = clone $unionType; // change alias to non-alias - $normalizedUnionType = TypeTraverser::map($normalizedUnionType, static function (Type $type, callable $callable) : Type { + TypeTraverser::map($normalizedUnionType, static function (Type $type, callable $callable) : Type { if (!$type instanceof AliasedObjectType && !$type instanceof ShortenedObjectType) { return $callable($type); }