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;
    }
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;
    }
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 ; }
Retrieve the class type hint when it is qualified.

@param Node\Name             $node    The name node to parse.
@param PhpFileModelInterface $phpFile The php file.

@return string The class type hint.
Retrieve the class type hint when it is qualified .