src/XliffDictionaryProvider.php
private function guardLanguages(
        string $sourceLanguage,
        string $targetLanguage,
        DictionaryInterface $dictionary
    ): void {
        if ($dictionary->getSourceLanguage() !== $sourceLanguage
            || $dictionary->getTargetLanguage() !== $targetLanguage) {
            throw new LanguageMismatchException(
                $sourceLanguage,
                $dictionary->getSourceLanguage(),
                $targetLanguage,
                $dictionary->getTargetLanguage()
            );
        }
    }
private function guardLanguages(
        string $sourceLanguage,
        string $targetLanguage,
        DictionaryInterface $dictionary
    ): void {
        if ($dictionary->getSourceLanguage() !== $sourceLanguage
            || $dictionary->getTargetLanguage() !== $targetLanguage) {
            throw new LanguageMismatchException(
                $sourceLanguage,
                $dictionary->getSourceLanguage(),
                $targetLanguage,
                $dictionary->getTargetLanguage()
            );
        }
    }
private function guardLanguages ( string $ sourceLanguage , string $ targetLanguage , DictionaryInterface $ dictionary ) : void { if ( $ dictionary -> getSourceLanguage ( ) !== $ sourceLanguage || $ dictionary -> getTargetLanguage ( ) !== $ targetLanguage ) { throw new LanguageMismatchException ( $ sourceLanguage , $ dictionary -> getSourceLanguage ( ) , $ targetLanguage , $ dictionary -> getTargetLanguage ( ) ) ; } }
Guard the language.

@param string              $sourceLanguage The source language.
@param string              $targetLanguage The target language.
@param DictionaryInterface $dictionary     The dictionary.

@return void

@throws LanguageMismatchException When the languages do not match the required language.
Guard the language .