diff options
Diffstat (limited to 'MLEB/cldr/CldrCurrencies.php')
-rw-r--r-- | MLEB/cldr/CldrCurrencies.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/MLEB/cldr/CldrCurrencies.php b/MLEB/cldr/CldrCurrencies.php index 4657c84e..400974a6 100644 --- a/MLEB/cldr/CldrCurrencies.php +++ b/MLEB/cldr/CldrCurrencies.php @@ -21,7 +21,6 @@ class CldrCurrency { return; } - $filename = null; $value = []; switch ( $data ) { case 'symbols' : @@ -75,10 +74,7 @@ class CldrCurrency { } // get the default (either the 'root' language, or the original ISO code) - $default = $currency_code; - if ( array_key_exists( 'root', self::$cache['symbols'][$currency_code] ) ) { - $default = self::$cache['symbols'][$currency_code]['root']; - } + $default = self::$cache['symbols'][$currency_code]['root'] ?? $currency_code; // language code might or might not exist if ( array_key_exists( $language_code, self::$cache['symbols'][$currency_code] ) ) { @@ -125,11 +121,7 @@ class CldrCurrency { if ( $country_code === 'UK' ) { $country_code = 'GB'; // iso overlap again } - if ( array_key_exists( $country_code, self::$cache['locale'] ) ) { - return self::$cache['locale'][$country_code]; - } else { - return []; - } + return self::$cache['locale'][$country_code] ?? []; } /** |