From d4fd813b339b1bf683eb3e78d63881f511150760 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 3 Apr 2024 07:05:33 +0000 Subject: [PATCH] Updated Rector to commit f889e416d94cbfcf3734bb2fd4daf678aa11f8a9 https://github.com/rectorphp/rector-src/commit/f889e416d94cbfcf3734bb2fd4daf678aa11f8a9 [DeadCode] Remove union with interface on RemoveUselessParamTagRector to make it consistent (#5794) --- src/Application/VersionResolver.php | 4 ++-- src/NodeTypeResolver/TypeComparator/TypeComparator.php | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 85a611fe139..cd782e601d2 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 = '8bce42424e3418ee287fe34b1004b1f66449b923'; + public const PACKAGE_VERSION = 'f889e416d94cbfcf3734bb2fd4daf678aa11f8a9'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-03 06:34:12'; + public const RELEASE_DATE = '2024-04-03 07:03:17'; /** * @var int */ diff --git a/src/NodeTypeResolver/TypeComparator/TypeComparator.php b/src/NodeTypeResolver/TypeComparator/TypeComparator.php index 02fe1cfcc90..bf4b25461cd 100644 --- a/src/NodeTypeResolver/TypeComparator/TypeComparator.php +++ b/src/NodeTypeResolver/TypeComparator/TypeComparator.php @@ -3,9 +3,7 @@ declare (strict_types=1); namespace Rector\NodeTypeResolver\TypeComparator; -use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode; use PhpParser\Node; -use PhpParser\Node\Name\FullyQualified; use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode; use PHPStan\PhpDocParser\Ast\Type\TypeNode; use PHPStan\Reflection\ClassReflection; @@ -104,9 +102,6 @@ final class TypeComparator } public function arePhpParserAndPhpStanPhpDocTypesEqual(Node $phpParserNode, TypeNode $phpStanDocTypeNode, Node $node) : bool { - if ($phpStanDocTypeNode instanceof UnionTypeNode && $phpParserNode instanceof FullyQualified) { - return \false; - } $phpParserNodeType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($phpParserNode); $phpStanDocType = $this->staticTypeMapper->mapPHPStanPhpDocTypeNodeToPHPStanType($phpStanDocTypeNode, $node); if (!$this->areTypesEqual($phpParserNodeType, $phpStanDocType) && $this->isSubtype($phpStanDocType, $phpParserNodeType)) {