Skip to content

Commit

Permalink
Updated Rector to commit f889e416d94cbfcf3734bb2fd4daf678aa11f8a9
Browse files Browse the repository at this point in the history
rectorphp/rector-src@f889e41 [DeadCode] Remove union with interface on RemoveUselessParamTagRector to make it consistent (#5794)
  • Loading branch information
TomasVotruba committed Apr 3, 2024
1 parent 36ab30b commit d4fd813
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
5 changes: 0 additions & 5 deletions src/NodeTypeResolver/TypeComparator/TypeComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -104,9 +102,6 @@ public function areTypesEqual(Type $firstType, Type $secondType) : bool
}
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)) {
Expand Down

0 comments on commit d4fd813

Please sign in to comment.