private function validateEachCanonicalLocaleExists(array $config)
    {
        $canonicals = $config['canonicals'] ?? [];
        foreach ($canonicals as $locale => $canonical) {
            if (!$this->existsAsLocale($config['locales'], $locale)) {
                throw new InvalidConfig('Canonical key '.$locale.' is not present as locale.');
            }
        }
    }
private function validateEachCanonicalLocaleExists(array $config)
    {
        $canonicals = $config['canonicals'] ?? [];
        foreach ($canonicals as $locale => $canonical) {
            if (!$this->existsAsLocale($config['locales'], $locale)) {
                throw new InvalidConfig('Canonical key '.$locale.' is not present as locale.');
            }
        }
    }
private function validateEachCanonicalLocaleExists ( array $ config ) { $ canonicals = $ config [ 'canonicals' ] ?? [ ] ; foreach ( $ canonicals as $ locale => $ canonical ) { if ( ! $ this -> existsAsLocale ( $ config [ 'locales' ] , $ locale ) ) { throw new InvalidConfig ( 'Canonical key ' . $ locale . ' is not present as locale.' ) ; } } }
Each custom canonical entry should point to an existing locale.

@param array $config
Each custom canonical entry should point to an existing locale .