fullyQualifiedClass = $fullyQualifiedClass; parent::__construct($alias); } public function getFullyQualifiedName() : string { return $this->fullyQualifiedClass; } /** * @param Use_::TYPE_* $useType */ public function getUseNode(int $useType) : Use_ { $name = new Name($this->fullyQualifiedClass); $useUse = new UseUse($name, $this->getClassName()); $use = new Use_([$useUse]); $use->type = $useType; return $use; } public function getShortName() : string { return $this->getClassName(); } /** * @param $this|\Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType $comparedObjectType */ public function areShortNamesEqual($comparedObjectType) : bool { return $this->getShortName() === $comparedObjectType->getShortName(); } public function equals(Type $type) : bool { // compare with FQN classes if ($type instanceof TypeWithClassName) { if ($type instanceof self && $this->fullyQualifiedClass === $type->getFullyQualifiedName()) { return \true; } if ($this->fullyQualifiedClass === $type->getClassName()) { return \true; } } return parent::equals($type); } }