src/RunOpenCode/ExchangeRate/Utils/CurrencyCodeUtil.php
public static function clean($currencyCode)
    {
        $clean = trim(strtoupper($currencyCode));

        if (!self::exists($clean)) {
            throw new UnknownCurrencyCodeException(sprintf('Unknown currency code "%s".', $currencyCode));
        }

        return $clean;
    }
public static function clean($currencyCode)
    {
        $clean = trim(strtoupper($currencyCode));

        if (!self::exists($clean)) {
            throw new UnknownCurrencyCodeException(sprintf('Unknown currency code "%s".', $currencyCode));
        }

        return $clean;
    }
Clean currency code

@param string $currencyCode Currency code to clean up.
@return string Cleaned ISO 4271 currency code.
@throws UnknownCurrencyCodeException If currency code does not exists.