2 declare(strict_types = 1);
77 throw new \InvalidArgumentException(
'localeMap must be array', 1537277153);
80 throw new \InvalidArgumentException(
'default must be string', 1537277154);
91 public function modify(): ?
string
93 $locale = $this->siteLanguage->getLocale();
94 foreach ($this->localeMap as $item) {
95 $pattern =
'#^' . $item[
'locale'] .
'#i';
96 if (preg_match($pattern, $locale)) {
97 return (
string)$item[
'value'];