Money\Currency::fromCode PHP Method

fromCode() public static method

Creates a Currency from its code
public static fromCode ( string $code ) : Currency
$code string
return Currency
    public static function fromCode($code)
    {
        if (!is_string($code) || strlen($code) !== 3) {
            throw new InvalidArgumentException('Currency code should be 3 letter ISO code');
        }
        return new self($code);
    }