Remove any created languages.

@AfterScenario
502264
public function cleanLanguages()
    {
        // Delete any languages that were created.
        foreach ($this->languages as $language) {
            $this->getDriver()->languageDelete($language);
            unset($this->languages[$language->langcode]);
        }
    }
1081990
public function resetAllTranslationFlags()
    {
        if (null === $this->translationRepository) {
            $this->translationRepository = $this->getContainer()->get('kunstmaan_translator.repository.translation');
        }

        $this->translationRepository->resetAllFlags();
    }
626980
public function cleanTerms()
    {
        // Remove any terms that were created.
        foreach ($this->terms as $term) {
            $this->getDriver()->termDelete($term);
        }
        $this->terms = array();
    }
702209
public function reset()
    {
        // Remove all rules and messages
        $this->rules = [];
        $this->messages = ['rules' => [], 'custom' => []];
        $this->clear();

        // Add the initial rules and messages
        Validate::addRuleSet($this);
        $this->setLanguage($this->lang, $this->langDir);

        return $this;
    }
660240
public function deleteAllCompile()
    {
        $a = array("dev", "prod");
        for ($i = 0; $i < count($a); $i++) {
            $this->callDelCreaServer($a[$i]);
        }
    }
655018
protected function restoreLanguage()
    {
        // Switch back to the original FE language to not disturb the frontend.
        if ($this->getMetaModel()->getActiveLanguage() != $GLOBALS['TL_LANGUAGE']) {
            $event = new LoadLanguageFileEvent('countries', null, true);
            $this->eventDispatcher->dispatch(ContaoEvents::SYSTEM_LOAD_LANGUAGE_FILE, $event);
        }
    }
248494
void deleteCurrentLocale() {

        // there has to remain at least one content locale
        if (m_contentLocales.size() > 1) {
            String deletedLocale = m_locale;
            m_contentLocales.remove(deletedLocale);
            m_registeredEntities.remove(m_entityId);
            m_changedEntityIds.remove(m_entityId);
            m_deletedEntities.add(m_entityId);
            getValidationHandler().getValidationContext().removeEntityId(m_entityId);
            unregistereEntity(m_entityId);
            enableSave();
            String nextLocale = null;
            if (m_registeredEntities.isEmpty()) {
                nextLocale = m_contentLocales.iterator().next();
            } else {
                nextLocale = CmsContentDefinition.getLocaleFromId(m_registeredEntities.iterator().next());
            }
            switchLocale(nextLocale);
        }
    }
413401
protected function removeTranslation($key)
    {
        if (true === isset(self::$translations[$key])) {
            unset(self::$translations[$key]);
        }
    }
671638
public function clean() : void
    {
        foreach ($this->retrieveAllKeys() as $k) {
            $this->remove((string)$k);
        }
    }
601663
public function removeNamespaceAlias()
	{
		$from = func_get_args();

		$filter = function($namespace) use ($from)
		{
			return ! in_array($namespace[0], $from);
		};

		$this->namespaces = array_filter($this->namespaces, $filter);
	}
1349970
public function removeScanner($languageName)
    {
        if (is_array($languageName)) {
            foreach ($languageName as $l) {
                unset($this->lookupTable[$l]);
                $this->unsetDescription($l);
            }
        } else {
            $this->unsetDescription($languageName);
            unset($this->lookupTable[$languageName]);
        }
    }
1102715
public function clean()
    {
        $this->removeAddenda();
        $this->removeIncompleteSchemaLocations();
        $this->removeNonSatNSNodes();
        $this->removeNonSatNSschemaLocations();
        $this->removeUnusedNamespaces();
    }
722735
public static function clearCache()
    {
        if (self::$_cacheTags) {
            self::$_cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array('Zend_Locale'));
        } else {
            self::$_cache->clean(Zend_Cache::CLEANING_MODE_ALL);
        }
    }
468366
private function removeLanguageMiddleware()
    {
        $this->info("Removing the Language middleware...");
        $this->helper->deleteFile($this->config->paths->project->LanguageMiddleware);
        $this->bar->advance();
    }
729597
protected function removeActiveLanguages(LanguageRepositoryInterface $languageRepository)
    {
        try {
            $languages = $languageRepository->activeLanguages();
            foreach ($languages as $language) {
                $language->delete();
            }

            return true;
        } catch (\Exception $ex) {
            $this->errorMessage = "An error occoured during the removing of existing languages. The reported error is: " . $ex->getMessage();

            return false;
        }
    }
1210629
public function cleanup()
    {
        if ($this->option('force')) {
            $this->deleteDirs();
        } elseif ($this->confirm('Delete all subdirectories in migrations folder?', true)) {
            $this->deleteDirs();
        }
    }
405020
public static function deleteEmptyAreas()
    {
        $app = Application::getFacadeApplication();
        $siteService = $app->make(SiteService::class);
        $multilingualSectionIDs = [];
        $sites = $siteService->getList();
        foreach ($sites as $site) {
            $multilingualSectionIDs = array_merge(MultilingualSection::getIDList($site));
        }
        $multilingualSections = [];
        foreach (array_unique($multilingualSectionIDs) as $multilingualSectionID) {
            $multilingualSections[] = MultilingualSection::getByID($multilingualSectionID);
        }

        $stackList = new StackList();
        $stackList->filterByGlobalAreas();

        /** @var \Concrete\Core\Page\Stack\Stack[] $globalAreaStacks */
        $globalAreaStacks = $stackList->getResults();

        foreach ($globalAreaStacks as $stack) {
            $stackAlternatives = [];
            if ($stack->isNeutralStack()) {
                $stackAlternatives[] = $stack;
            } else {
                $stackAlternatives[] = $stack->getNeutralStack();
            }
            foreach ($multilingualSections as $multilingualSection) {
                $stackAlternative = $stackAlternatives[0]->getLocalizedStack($multilingualSection);
                if ($stackAlternative !== null) {
                    $stackAlternatives[] = $stackAlternative;
                }
            }
            $hasBlocks = false;
            foreach ($stackAlternatives as $stackAlternative) {
                // get list of all available page versions, we only delete areas if they never had any content
                $versionList = new VersionList($stackAlternative);
                $versions = $versionList->get();

                foreach ($versions as $version) {
                    $pageVersion = Page::getByID($version->getCollectionID(), $version->getVersionID());
                    $totalBlocks = count($pageVersion->getBlockIDs());

                    if ($totalBlocks > 0) {
                        $hasBlocks = true;
                        break 2;
                    }
                }
            }

            if (!$hasBlocks) {
                $stackAlternatives[0]->delete();
            }
        }
    }