src/Classes/Validation.php
/**
     * Validate that the currency is supported by the
     * Exchange Rates API.
     *
     * @param string $currencyCode
     *
     * @throws InvalidCurrencyException
     */
Validate that the currency is supported by the
Exchange Rates API.

@param string $currencyCode


Validate that the currency is supported by the Exchange Rates API . @param string $currencyCode
public static function validateCurrencyCode(string $currencyCode)
    {
        $currencies = new Currency();
        if (! $currencies->isAllowableCurrency($currencyCode)) {
            throw new InvalidCurrencyException($currencyCode.' is not a valid country code.');
        }
    }
public static function validateCurrencyCode ( string $ currencyCode ) { $ currencies = new Currency ( ) ; if ( ! $ currencies -> isAllowableCurrency ( $ currencyCode ) ) { throw new InvalidCurrencyException ( $ currencyCode . ' is not a valid country code.' ) ; } }
Validate that the currency is supported by the
 Exchange Rates API.
Validate that the currency is supported by the Exchange Rates API .