You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (isset(self::$preferredAlpha2ToAlpha3Mapping[$language])) {
213
+
if (isset(self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$language])) {
214
214
// Validate to prevent typos
215
-
if (!isset($aliases[self::$preferredAlpha2ToAlpha3Mapping[$language]])) {
216
-
thrownewRuntimeException('The statically set three-letter mapping '.self::$preferredAlpha2ToAlpha3Mapping[$language].' for the language code '.$language.' seems to be invalid. Typo?');
215
+
if (!isset($aliases[self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$language]])) {
216
+
thrownewRuntimeException('The statically set three-letter mapping '.self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$language].' for the language code '.$language.' seems to be invalid. Typo?');
@@ -225,7 +225,7 @@ private function generateAlpha2ToAlpha3Mapping(ArrayAccessibleResourceBundle $me
225
225
226
226
$alpha2ToAlpha3[$language] = $alpha3;
227
227
} elseif (isset($alpha2ToAlpha3[$language])) {
228
-
thrownewRuntimeException('Multiple three-letter mappings exist for the language code '.$language.'. Please add one of them to the property $preferredAlpha2ToAlpha3Mapping.');
228
+
thrownewRuntimeException('Multiple three-letter mappings exist for the language code '.$language.'. Please add one of them to the const PREFERRED_ALPHA2_TO_ALPHA3_MAPPING.');
if (isset(self::$preferredAlpha2ToAlpha3Mapping[$country])) {
184
+
if (isset(self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$country])) {
185
185
// Validate to prevent typos
186
-
if (!isset($aliases[self::$preferredAlpha2ToAlpha3Mapping[$country]])) {
187
-
thrownewRuntimeException('The statically set three-letter mapping '.self::$preferredAlpha2ToAlpha3Mapping[$country].' for the country code '.$country.' seems to be invalid. Typo?');
186
+
if (!isset($aliases[self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$country]])) {
187
+
thrownewRuntimeException('The statically set three-letter mapping '.self::PREFERRED_ALPHA2_TO_ALPHA3_MAPPING[$country].' for the country code '.$country.' seems to be invalid. Typo?');
@@ -196,7 +196,7 @@ private function generateAlpha2ToAlpha3Mapping(array $countries, ArrayAccessible
196
196
197
197
$alpha2ToAlpha3[$country] = $alpha3;
198
198
} elseif (isset($alpha2ToAlpha3[$country])) {
199
-
thrownewRuntimeException('Multiple three-letter mappings exist for the country code '.$country.'. Please add one of them to the property $preferredAlpha2ToAlpha3Mapping.');
199
+
thrownewRuntimeException('Multiple three-letter mappings exist for the country code '.$country.'. Please add one of them to the const PREFERRED_ALPHA2_TO_ALPHA3_MAPPING.');
0 commit comments