src/MoneyBag.php
public function add(MoneyContainer $money) : MoneyBag
    {
        foreach ($money->getAmounts() as $currencyCode => $amount) {
            $this->amounts[$currencyCode] = $this->getAmount($currencyCode)->plus($amount);
        }

        return $this;
    }
public function add(MoneyContainer $money) : MoneyBag
    {
        foreach ($money->getAmounts() as $currencyCode => $amount) {
            $this->amounts[$currencyCode] = $this->getAmount($currencyCode)->plus($amount);
        }

        return $this;
    }
public function add ( MoneyContainer $ money ) : MoneyBag { foreach ( $ money -> getAmounts ( ) as $ currencyCode => $ amount ) { $ this -> amounts [ $ currencyCode ] = $ this -> getAmount ( $ currencyCode ) -> plus ( $ amount ) ; } return $ this ; }
Adds money to this bag.

@param MoneyContainer $money A Money, RationalMoney, or MoneyBag instance.

@return MoneyBag This instance.
Adds money to this bag .