From 570bed623d100d9a761a21ae33920a944bf30430 Mon Sep 17 00:00:00 2001 From: PrinsFrank Date: Sun, 1 Jan 2023 19:34:39 +0000 Subject: [PATCH] Automatic Currency spec update from upstream changes --- src/Currency/ISO4217_Alpha_3.php | 4 +++- src/Currency/ISO4217_Name.php | 4 +++- src/Currency/ISO4217_Numeric.php | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Currency/ISO4217_Alpha_3.php b/src/Currency/ISO4217_Alpha_3.php index 8599b50b..5fba01c3 100644 --- a/src/Currency/ISO4217_Alpha_3.php +++ b/src/Currency/ISO4217_Alpha_3.php @@ -86,7 +86,6 @@ enum ISO4217_Alpha_3: string case Jordanian_Dinar = 'JOD'; case Kenyan_Shilling = 'KES'; case Kina = 'PGK'; - case Kuna = 'HRK'; case Kuwaiti_Dinar = 'KWD'; case Kwanza = 'AOA'; case Kyat = 'MMK'; @@ -192,6 +191,9 @@ enum ISO4217_Alpha_3: string case Zimbabwe_Dollar = 'ZWL'; case Zloty = 'PLN'; + /** @deprecated Has been removed from the specification but is maintained here for Backwards Compatibility reasons */ + case Kuna = 'HRK'; + public function toISO4217_Numeric(): ISO4217_Numeric { return BackedEnum::fromKey(ISO4217_Numeric::class, $this->name); diff --git a/src/Currency/ISO4217_Name.php b/src/Currency/ISO4217_Name.php index cc2df014..a84c3eaa 100644 --- a/src/Currency/ISO4217_Name.php +++ b/src/Currency/ISO4217_Name.php @@ -86,7 +86,6 @@ enum ISO4217_Name: string case Jordanian_Dinar = 'Jordanian Dinar'; case Kenyan_Shilling = 'Kenyan Shilling'; case Kina = 'Kina'; - case Kuna = 'Kuna'; case Kuwaiti_Dinar = 'Kuwaiti Dinar'; case Kwanza = 'Kwanza'; case Kyat = 'Kyat'; @@ -192,6 +191,9 @@ enum ISO4217_Name: string case Zimbabwe_Dollar = 'Zimbabwe Dollar'; case Zloty = 'Zloty'; + /** @deprecated Has been removed from the specification but is maintained here for Backwards Compatibility reasons */ + case Kuna = 'Kuna'; + public function toISO4217_Alpha_3(): ISO4217_Alpha_3 { return BackedEnum::fromKey(ISO4217_Alpha_3::class, $this->name); diff --git a/src/Currency/ISO4217_Numeric.php b/src/Currency/ISO4217_Numeric.php index 973ba8cf..f9786943 100644 --- a/src/Currency/ISO4217_Numeric.php +++ b/src/Currency/ISO4217_Numeric.php @@ -86,7 +86,6 @@ enum ISO4217_Numeric: string case Jordanian_Dinar = '400'; case Kenyan_Shilling = '404'; case Kina = '598'; - case Kuna = '191'; case Kuwaiti_Dinar = '414'; case Kwanza = '973'; case Kyat = '104'; @@ -192,6 +191,9 @@ enum ISO4217_Numeric: string case Zimbabwe_Dollar = '932'; case Zloty = '985'; + /** @deprecated Has been removed from the specification but is maintained here for Backwards Compatibility reasons */ + case Kuna = '191'; + public static function fromInt(int $from): self { return self::from(str_pad((string) $from, 3, '0', STR_PAD_LEFT));