src/Standards/BestIt/Sniffs/Formatting/AlphabeticallySortedUsesSniff.php
private function removeOldUseStatements(UseStatement $firstUseStatement): void
    {
        $file = $this->getFile()->getBaseFile();
        $lastUseStatement = end($this->useStatements);
        $lastSemicolonPointer = TokenHelper::findNext($file, T_SEMICOLON, $lastUseStatement->getPointer());

        for ($i = $firstUseStatement->getPointer(); $i <= $lastSemicolonPointer; $i++) {
            $file->fixer->replaceToken($i, '');
        }
    }
private function removeOldUseStatements(UseStatement $firstUseStatement): void
    {
        $file = $this->getFile()->getBaseFile();
        $lastUseStatement = end($this->useStatements);
        $lastSemicolonPointer = TokenHelper::findNext($file, T_SEMICOLON, $lastUseStatement->getPointer());

        for ($i = $firstUseStatement->getPointer(); $i <= $lastSemicolonPointer; $i++) {
            $file->fixer->replaceToken($i, '');
        }
    }
private function removeOldUseStatements ( UseStatement $ firstUseStatement ) : void { $ file = $ this -> getFile ( ) -> getBaseFile ( ) ; $ lastUseStatement = end ( $ this -> useStatements ) ; $ lastSemicolonPointer = TokenHelper :: findNext ( $ file , T_SEMICOLON , $ lastUseStatement -> getPointer ( ) ) ; for ( $ i = $ firstUseStatement -> getPointer ( ) ; $ i <= $ lastSemicolonPointer ; $ i ++ ) { $ file -> fixer -> replaceToken ( $ i , '' ) ; } }
Removes the lines of the old statements.

@param UseStatement $firstUseStatement

@return void
Removes the lines of the old statements .