src/Money.php
public function add(Money ...$addends)
    {
        $amount = $this->amount;
        $calculator = $this->getCalculator();

        foreach ($addends as $addend) {
            $this->assertSameCurrency($addend);

            $amount = $calculator->add($amount, $addend->amount);
        }

        return new self($amount, $this->currency);
    }
public function add(Money ...$addends)
    {
        $amount = $this->amount;
        $calculator = $this->getCalculator();

        foreach ($addends as $addend) {
            $this->assertSameCurrency($addend);

            $amount = $calculator->add($amount, $addend->amount);
        }

        return new self($amount, $this->currency);
    }
public function add ( Money ... $ addends ) { $ amount = $ this -> amount ; $ calculator = $ this -> getCalculator ( ) ; foreach ( $ addends as $ addend ) { $ this -> assertSameCurrency ( $ addend ) ; $ amount = $ calculator -> add ( $ amount , $ addend -> amount ) ; } return new self ( $ amount , $ this -> currency ) ; }
Returns a new Money object that represents
the sum of this and an other Money object.

@param Money[] $addends

@return Money
Returns a new Money object that represents the sum of this and an other Money object .