@param MoneyInterface $first
@param MoneyInterface $second

@return boolean
@throws CurrencyMismatchException
325085
public function isGt(MoneyInterface $first, MoneyInterface $second)
    {
        $this->resolveCurrency($first, $second);
        return $this->math->isGt($first->getAmount(), $second->getAmount());
    }
980162
public function add(Money $money)
  {
    if($this->isSameCurrency($money))
    {
      return Money::init($this->cents + $money->cents, $this->currency->getIsoCode());
    }

    throw new InvalidCurrencyException("You can't add two Money objects with different currencies");
  }
371944
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $currencyCode = $input->getArgument('currencyCode');
        $ratio = (float) $input->getArgument('ratio');

        /** @var PairManagerInterface $pairManager */
        $pairManager = $this->getContainer()->get('tbbc_money.pair_manager');
        try {
            $pairManager->saveRatio($currencyCode, $ratio);
            $output->writeln('ratio saved');
        } catch (MoneyException $e) {
            $output->writeln('ERROR : ratio no saved du to error : '.$e->getMessage());
        }
    }
1024888
public function isGreater(Money $a, Money $b) : bool
    {
        return $this->compare($a, $b) > 0;
    }
712234
public function add(Money\Money $money1, Money\Money $money2)
    {
        return $this->accountant->add($money1, $money2);
    }
703122
public function isLt(MoneyInterface $first, MoneyInterface $second)
    {
        $this->resolveCurrency($first, $second);
        return $this->math->isLt($first->getAmount(), $second->getAmount());
    }
137684
public function setSecond($second)
    {
        if (Format::isIdentifier($second)) {
            $this->second = $second;
        } else {
            $msg = "'${second}' is an invalid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
810984
public function printMoney(MoneyInterface $money = null)
    {
        if (!($money instanceof MoneyInterface)) {
            return '';
        }

        if (!($money->getCurrency() instanceof CurrencyInterface)) {
            return $money->getAmount();
        }

        $moneyFormatter = new NumberFormatter(
            $this->locale->getIso(),
            NumberFormatter::CURRENCY
        );

        /**
         * The precision of the integer amount for a given Money
         * (cents, thousandths, 10-thousandths, etc) should be
         * stored in the Currency object. We assume amounts are
         * represented in cents.
         *
         * Loss of precision due to conversion is possible, but only when
         * displaying prices. This operation does not affect amounts
         */

        return $moneyFormatter
            ->formatCurrency(
                $money->getAmount() / 100,
                $money->getCurrency()->getIso()
            );
    }
236531
public function sameValueAs(ValueObjectInterface $money)
    {
        if (false === Util::classEquals($this, $money)) {
            return false;
        }

        return $this->getAmount()->sameValueAs($money->getAmount()) && $this->getCurrency()->sameValueAs($money->getCurrency());
    }
772596
private BigMoney checkCurrencyEqual(BigMoneyProvider moneyProvider) {
        BigMoney money = of(moneyProvider);
        if (isSameCurrency(money) == false) {
            throw new CurrencyMismatchException(getCurrencyUnit(), money.getCurrencyUnit());
        }
        return money;
    }
450418
public function setAbsolutePrice(MoneyInterface $amount)
    {
        $this->absolutePriceAmount = $amount->getAmount();
        $this->absolutePriceCurrency = $amount->getCurrency();

        return $this;
    }
313644
public function convert($currency)
    {
        if ($this->isAvailable($currency)) {
            $rate = 1 / $this->rates[$currency];
            return round($this->base * $rate, 2);
        } else {
            throw new RuntimeException(sprintf(
                'Target currency "%s" does not belong to the registered map of rates', $currency
            ));
        }
    }
379896
private function _checkCurrency(&$currency)
    {
        if (!isset($currency)) {
            throw new Klarna_ArgumentNotSetException("Currency");
        }
        if (is_numeric($currency) && !is_int($currency)) {
            $currency = intval($currency);
        }
        if (!is_numeric($currency) || !is_int($currency)) {
            throw new Klarna_InvalidTypeException("Currency", "integer");
        }
    }
1008302
private function validateHash($firstHash, $secondHash)
    {
        // Empty hash will always return false, because they are no validatable
        if (empty($firstHash) || empty($secondHash)) {
            throw new InvalidArgumentException('FlysystemAssetStore::validateHash can not validate empty hashes');
        }
        // Return true if $firstHash start with $secondHash or if $secondHash starts with $firstHash
        return
            strpos($firstHash, $secondHash) === 0 ||
            strpos($secondHash, $firstHash) === 0;
    }
720285
public function add(Money $money1, Money $money2)
    {
        $this->checkCurrenciesMatch($money1, $money2);

        return new Money(
            $money1->getAmount() + $money2->getAmount(),
            $money1->getCurrency()
        );
    }
790046
public function shouldPrecede($first, $second) {
    $page = $this->getSession()->getPage()->getText();
    $pos1 = strpos($page, $first);
    if ($pos1 === FALSE) {
      throw new ExpectationException("Text not found: '$first'.", $this->getSession());
    }
    $pos2 = strpos($page, $second);
    if ($pos2 === FALSE) {
      throw new ExpectationException("Text not found: '$second'.", $this->getSession());
    }
    if ($pos2 < $pos1) {
      throw new \Exception("Text '$first' does not precede text '$second'.");
    }
  }
182479
public function calculateExchangeRate(
        CurrencyInterface $currencyFrom,
        CurrencyInterface $currencyTo
    ) {
        $currencyFromIso = $currencyFrom->getIso();
        $currencyToIso = $currencyTo->getIso();

        if ($currencyFromIso == $currencyToIso) {
            return 1.0;
        }

        return $this
            ->calculateExchangeRateBetweenIsos(
                $currencyFromIso,
                $currencyToIso
            );
    }