src/Standards/BestIt/Sniffs/Formatting/AlphabeticallySortedUsesSniff.php
protected function fixDefaultProblem(CodeWarning $error): void
    {
        // Satisfy phpmd
        unset($error);

        $firstUseStatement = reset($this->useStatements);

        $file = $this->getFile()->getBaseFile();

        $file->fixer->beginChangeset();

        $this->removeOldUseStatements($firstUseStatement);

        $file->fixer->addContent(
            $firstUseStatement->getPointer(),
            $this->getNewUseStatements()
        );

        $file->fixer->endChangeset();
    }
protected function fixDefaultProblem(CodeWarning $error): void
    {
        // Satisfy phpmd
        unset($error);

        $firstUseStatement = reset($this->useStatements);

        $file = $this->getFile()->getBaseFile();

        $file->fixer->beginChangeset();

        $this->removeOldUseStatements($firstUseStatement);

        $file->fixer->addContent(
            $firstUseStatement->getPointer(),
            $this->getNewUseStatements()
        );

        $file->fixer->endChangeset();
    }
protected function fixDefaultProblem ( CodeWarning $ error ) : void { // Satisfy phpmd unset ( $ error ) ; $ firstUseStatement = reset ( $ this -> useStatements ) ; $ file = $ this -> getFile ( ) -> getBaseFile ( ) ; $ file -> fixer -> beginChangeset ( ) ; $ this -> removeOldUseStatements ( $ firstUseStatement ) ; $ file -> fixer -> addContent ( $ firstUseStatement -> getPointer ( ) , $ this -> getNewUseStatements ( ) ) ; $ file -> fixer -> endChangeset ( ) ; }
Sorts the uses correctly and saves them in the file.

@param CodeWarning $error

@return void
Sorts the uses correctly and saves them in the file .