We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bed9935 commit f27f1a5Copy full SHA for f27f1a5
1 file changed
src/StaticTypeMapper/ValueObject/Type/FullyQualifiedObjectType.php
@@ -5,10 +5,12 @@
5
namespace Rector\StaticTypeMapper\ValueObject\Type;
6
7
use Nette\Utils\Strings;
8
+use Override;
9
use PhpParser\Node\Name;
10
use PhpParser\Node\Stmt\Use_;
11
use PhpParser\Node\UseItem;
12
use PHPStan\Type\ObjectType;
13
+use PHPStan\Type\Type;
14
use Rector\NodeTypeResolver\Node\AttributeKey;
15
16
/**
@@ -64,4 +66,17 @@ public function getShortNameLowered(): string
64
66
{
65
67
return strtolower($this->getShortName());
68
}
69
+
70
+ #[Override]
71
+ public function equals(Type $type): bool
72
+ {
73
+ $isEqual = parent::equals($type);
74
75
+ if ($isEqual) {
76
+ return true;
77
+ }
78
79
+ return $type::class === ObjectType::class
80
+ && $type->getClassName() === $this->getClassName();
81
82
0 commit comments