protected function applyFix(\SplFileInfo $file, Tokens $tokens)
    {
        $tokensAnalyzer = new TokensAnalyzer($tokens);
        $usesIndexes = $tokensAnalyzer->getImportUseIndexes();

        foreach ($usesIndexes as $idx) {
            $nextTokenIdx = $tokens->getNextMeaningfulToken($idx);
            $nextToken = $tokens[$nextTokenIdx];

            if ($nextToken->isGivenKind(T_NS_SEPARATOR)) {
                $tokens->clearAt($nextTokenIdx);
            } elseif ($nextToken->isGivenKind([CT::T_FUNCTION_IMPORT, CT::T_CONST_IMPORT])) {
                $nextTokenIdx = $tokens->getNextMeaningfulToken($nextTokenIdx);
                if ($tokens[$nextTokenIdx]->isGivenKind(T_NS_SEPARATOR)) {
                    $tokens->clearAt($nextTokenIdx);
                }
            }
        }
    }
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
    {
        $tokensAnalyzer = new TokensAnalyzer($tokens);
        $usesIndexes = $tokensAnalyzer->getImportUseIndexes();

        foreach ($usesIndexes as $idx) {
            $nextTokenIdx = $tokens->getNextMeaningfulToken($idx);
            $nextToken = $tokens[$nextTokenIdx];

            if ($nextToken->isGivenKind(T_NS_SEPARATOR)) {
                $tokens->clearAt($nextTokenIdx);
            } elseif ($nextToken->isGivenKind([CT::T_FUNCTION_IMPORT, CT::T_CONST_IMPORT])) {
                $nextTokenIdx = $tokens->getNextMeaningfulToken($nextTokenIdx);
                if ($tokens[$nextTokenIdx]->isGivenKind(T_NS_SEPARATOR)) {
                    $tokens->clearAt($nextTokenIdx);
                }
            }
        }
    }
protected function applyFix ( \ SplFileInfo $ file , Tokens $ tokens ) { $ tokensAnalyzer = new TokensAnalyzer ( $ tokens ) ; $ usesIndexes = $ tokensAnalyzer -> getImportUseIndexes ( ) ; foreach ( $ usesIndexes as $ idx ) { $ nextTokenIdx = $ tokens -> getNextMeaningfulToken ( $ idx ) ; $ nextToken = $ tokens [ $ nextTokenIdx ] ; if ( $ nextToken -> isGivenKind ( T_NS_SEPARATOR ) ) { $ tokens -> clearAt ( $ nextTokenIdx ) ; } elseif ( $ nextToken -> isGivenKind ( [ CT :: T_FUNCTION_IMPORT , CT :: T_CONST_IMPORT ] ) ) { $ nextTokenIdx = $ tokens -> getNextMeaningfulToken ( $ nextTokenIdx ) ; if ( $ tokens [ $ nextTokenIdx ] -> isGivenKind ( T_NS_SEPARATOR ) ) { $ tokens -> clearAt ( $ nextTokenIdx ) ; } } } }
{@inheritdoc}
{