private function getQualifiedClassType(Node\Name $node, PhpFileModelInterface $phpFile): string
    {
        $path      = $node->toString();
        $firstPart = $node->getFirst();

        if ($phpFile->hasUse($firstPart)) {
            return str_replace($firstPart, $phpFile->getUse($firstPart), $path);
        }
        if ($phpFile->getNamespace() !== null
            && $firstPart === $phpFile->getNamespace()[count($phpFile->getNamespace()) - 1]
        ) {
            return str_replace($firstPart, $phpFile->getNamespaceString(), $path);
        }
        return $phpFile->getNamespaceString() . '\\' . $path;
    }