services/Optimizer.php
public function run()
    {
        $this->_scanner = new Scanner();
        $this->_scanner->run();
        $this->_scanner->stdout('Deleted language elements - BEGIN', Console::FG_RED);

        $languageSourceIds = $this->_scanner->getRemovableLanguageSourceIds();

        $this->_initLanguageElements($languageSourceIds);

        LanguageSource::deleteAll(['id' => $languageSourceIds]);

        $this->_scanner->stdout('Deleted language elements - END', Console::FG_RED);

        return count($languageSourceIds);
    }
public function run()
    {
        $this->_scanner = new Scanner();
        $this->_scanner->run();
        $this->_scanner->stdout('Deleted language elements - BEGIN', Console::FG_RED);

        $languageSourceIds = $this->_scanner->getRemovableLanguageSourceIds();

        $this->_initLanguageElements($languageSourceIds);

        LanguageSource::deleteAll(['id' => $languageSourceIds]);

        $this->_scanner->stdout('Deleted language elements - END', Console::FG_RED);

        return count($languageSourceIds);
    }
public function run ( ) { $ this -> _scanner = new Scanner ( ) ; $ this -> _scanner -> run ( ) ; $ this -> _scanner -> stdout ( 'Deleted language elements - BEGIN' , Console :: FG_RED ) ; $ languageSourceIds = $ this -> _scanner -> getRemovableLanguageSourceIds ( ) ; $ this -> _initLanguageElements ( $ languageSourceIds ) ; LanguageSource :: deleteAll ( [ 'id' => $ languageSourceIds ] ) ; $ this -> _scanner -> stdout ( 'Deleted language elements - END' , Console :: FG_RED ) ; return count ( $ languageSourceIds ) ; }
Removing unused language elements from database.

@return int The number of removed language elements.
Removing unused language elements from database .