private function getClassType($node, TypeInterface $parent): string
    {
        $phpFile = RootRetrieverHelper::getRoot($parent);

        switch (true) {
            case $node instanceof Node\Identifier:
            case $node->isRelative():
            case $node->isUnqualified():
                $name = $this->getUnqualifiedClassType($node, $phpFile);
                break;
            case $node->isFullyQualified():
                $name = $node->toString();
                break;
            case $node->isQualified():
                $name = $this->getQualifiedClassType($node, $phpFile);
                break;
            default:
                return TypeInterface::UNKNOWN_CUSTOM;
        }

        // Get the last name part
        $nameArray = explode('\\', $name);
        $lastPart  = end($nameArray);

        $phpFile->addConcreteUse($name, $lastPart);

        return $lastPart;
    }