src/RationalMoney.php
public static function of($amount, $currency) : RationalMoney
    {
        $amount = BigRational::of($amount);

        if (! $currency instanceof Currency) {
            $currency = Currency::of($currency);
        }

        return new RationalMoney($amount, $currency);
    }
public static function of($amount, $currency) : RationalMoney
    {
        $amount = BigRational::of($amount);

        if (! $currency instanceof Currency) {
            $currency = Currency::of($currency);
        }

        return new RationalMoney($amount, $currency);
    }
public static function of ( $ amount , $ currency ) : RationalMoney { $ amount = BigRational :: of ( $ amount ) ; if ( ! $ currency instanceof Currency ) { $ currency = Currency :: of ( $ currency ) ; } return new RationalMoney ( $ amount , $ currency ) ; }
Convenience factory method.

@param BigNumber|number|string $amount   The monetary amount.
@param Currency|string         $currency The Currency instance, ISO currency code or ISO numeric currency code.

@return RationalMoney
Convenience factory method .