diff --git a/packages/intl/src/Catalog/GenericCatalog.php b/packages/intl/src/Catalog/GenericCatalog.php index 34aa05d1f..0df1660f2 100644 --- a/packages/intl/src/Catalog/GenericCatalog.php +++ b/packages/intl/src/Catalog/GenericCatalog.php @@ -21,14 +21,7 @@ public function has(Locale $locale, string $key): bool public function get(Locale $locale, string $key): ?string { - return Arr\get_by_key( - array: $this->catalog, - key: "{$locale->value}.{$key}", - default: Arr\get_by_key( - array: $this->catalog, - key: "{$locale->getLanguage()}.{$key}", - ), - ); + return Arr\get_by_key($this->catalog, "{$locale->value}.{$key}") ?? Arr\get_by_key($this->catalog, "{$locale->getLanguage()}.{$key}"); } public function add(Locale $locale, string $key, string $message): self