style updates
This commit is contained in:
@@ -69,7 +69,7 @@ final class Iso3166
|
||||
$country = self::normaliseAlpha2($countryAlpha2);
|
||||
$code = strtoupper(trim($subdivisionCode));
|
||||
|
||||
if (str_starts_with($code, $country.'-')) {
|
||||
if (str_starts_with($code, $country . '-')) {
|
||||
return $code;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ final class Iso3166
|
||||
throw new InvalidArgumentException('ISO 3166-2 subdivision codes must contain 1 to 6 letters or numbers after the country prefix.');
|
||||
}
|
||||
|
||||
return $country.'-'.$code;
|
||||
return $country . '-' . $code;
|
||||
}
|
||||
|
||||
public static function flagEmoji(string $alpha2): string
|
||||
@@ -85,6 +85,6 @@ final class Iso3166
|
||||
$alpha2 = self::normaliseAlpha2($alpha2);
|
||||
$base = 127397;
|
||||
|
||||
return mb_chr($base + ord($alpha2[0]), 'UTF-8').mb_chr($base + ord($alpha2[1]), 'UTF-8');
|
||||
return mb_chr($base + ord($alpha2[0]), 'UTF-8') . mb_chr($base + ord($alpha2[1]), 'UTF-8');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user