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
There are some APIs that return the currency code in a lowercase. This results in an unknown currency code and a whole bunch of strtoupper calls all over the codebase it makes the code fundamentally fragile if a strtoupper is missed somewhere the code ends up breaking somewhere.
I purpose that Currency::of supports upper and lower case. It would be a lot easier to add a strtoupper there to ensure all codes passed at converted to upper case. Thus isolating this logic that the currency code must be uppercase.
The text was updated successfully, but these errors were encountered:
There are some APIs that return the currency code in a lowercase. This results in an unknown currency code and a whole bunch of
strtoupper
calls all over the codebase it makes the code fundamentally fragile if astrtoupper
is missed somewhere the code ends up breaking somewhere.I purpose that
Currency::of
supports upper and lower case. It would be a lot easier to add astrtoupper
there to ensure all codes passed at converted to upper case. Thus isolating this logic that the currency code must be uppercase.The text was updated successfully, but these errors were encountered: