public function convertMoney(
        MoneyInterface $money,
        CurrencyInterface $currencyTo
    ) {
        $currencyFrom = $money->getCurrency();
        $amount = $money->getAmount();

        return $this->convertCurrency(
            $currencyFrom,
            $currencyTo,
            $amount
        );
    }
public function convertMoney(
        MoneyInterface $money,
        CurrencyInterface $currencyTo
    ) {
        $currencyFrom = $money->getCurrency();
        $amount = $money->getAmount();

        return $this->convertCurrency(
            $currencyFrom,
            $currencyTo,
            $amount
        );
    }
public function convertMoney ( MoneyInterface $ money , CurrencyInterface $ currencyTo ) { $ currencyFrom = $ money -> getCurrency ( ) ; $ amount = $ money -> getAmount ( ) ; return $ this -> convertCurrency ( $ currencyFrom , $ currencyTo , $ amount ) ; }
Given an amount, convert it to desired Currency.

If amount currency is the same as desired Currency, return itself

If is impossible to convert to desired Currency, throw Exception

@param MoneyInterface    $money
@param CurrencyInterface $currencyTo

@return MoneyInterface Money converted

@throws CurrencyNotConvertibleException Currencies cannot be converted
Given an amount convert it to desired Currency .