src/Amount.php
protected function validateOtherAmount(AmountInterface $amount) {
    if ($this->getCurrency()->getCurrencyCode() !== $amount->getCurrency()->getCurrencyCode()) {
      throw new \InvalidArgumentException(sprintf('Both amounts must be in %s, but the other amount is in %s.', $this->getCurrency()->getCurrencyCode(), $amount->getCurrency()->getCurrencyCode()));
    }
  }
protected function validateOtherAmount(AmountInterface $amount) {
    if ($this->getCurrency()->getCurrencyCode() !== $amount->getCurrency()->getCurrencyCode()) {
      throw new \InvalidArgumentException(sprintf('Both amounts must be in %s, but the other amount is in %s.', $this->getCurrency()->getCurrencyCode(), $amount->getCurrency()->getCurrencyCode()));
    }
  }
protected function validateOtherAmount ( AmountInterface $ amount ) { if ( $ this -> getCurrency ( ) -> getCurrencyCode ( ) !== $ amount -> getCurrency ( ) -> getCurrencyCode ( ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Both amounts must be in %s, but the other amount is in %s.' , $ this -> getCurrency ( ) -> getCurrencyCode ( ) , $ amount -> getCurrency ( ) -> getCurrencyCode ( ) ) ) ; } }
Validates another amount against this one.

@param \Commercie\Money\AmountInterface $amount

@throws \InvalidArgumentException
Validates another amount against this one .