library/Money/MoneyTrait.php
public function add(MoneyInterface $money)
    {
        if ($this->currency !== $money->getCurrency()) {
            throw new CurrencyMismatchException('Operations between different currencies are not supported');
        }

        $this->amount = $this->toInt($this->amount + $money->getAmount());
        return $this;
    }
public function add(MoneyInterface $money)
    {
        if ($this->currency !== $money->getCurrency()) {
            throw new CurrencyMismatchException('Operations between different currencies are not supported');
        }

        $this->amount = $this->toInt($this->amount + $money->getAmount());
        return $this;
    }
public function add ( MoneyInterface $ money ) { if ( $ this -> currency !== $ money -> getCurrency ( ) ) { throw new CurrencyMismatchException ( 'Operations between different currencies are not supported' ) ; } $ this -> amount = $ this -> toInt ( $ this -> amount + $ money -> getAmount ( ) ) ; return $ this ; }
Add the monetary value of another MoneyInterface object to this object

@param MoneyInterface $money
@return $this
Add the monetary value of another MoneyInterface object to this object