public function equals(PhpType $type) { if ($type->isClass() && strtolower($type->toMaybeObjectType()->getName()) === strtolower($this->getName())) { return true; } if ($type instanceof ProxyObjectType && strtolower($type->getReferenceName()) === strtolower($this->getName())) { return true; } return false; }