public static function isValidCode($code)
    {
        if (array_key_exists($code, self::getInfoForCurrencies())) {
            return true;
        } elseif (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {
            return true;
        } elseif (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {
            return true;
        } elseif (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {
            return true;
        } else {
            return false;
        }
    }
public static function isValidCode($code)
    {
        if (array_key_exists($code, self::getInfoForCurrencies())) {
            return true;
        } elseif (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {
            return true;
        } elseif (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {
            return true;
        } elseif (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {
            return true;
        } else {
            return false;
        }
    }
public static function isValidCode ( $ code ) { if ( array_key_exists ( $ code , self :: getInfoForCurrencies ( ) ) ) { return true ; } elseif ( array_key_exists ( $ code , self :: getInfoForCurrenciesWithoutCurrencyCode ( ) ) ) { return true ; } elseif ( array_key_exists ( $ code , self :: getInfoForCurrenciesWithUnofficialCode ( ) ) ) { return true ; } elseif ( array_key_exists ( $ code , self :: getInfoForCurrenciesWithHistoricalCode ( ) ) ) { return true ; } else { return false ; } }
Is the given code valid?

@param string $code the three-letter currency code

@return boolean
Is the given code valid?