public function addDiscountAdjustment(Adjustment $discount): void
    {
        foreach ($this->discounts as $d) {
            if ($d->isSameAs($discount)) {
                $d->addAmount($discount->getAmount());

                return;
            }
        }

        $this->discounts[] = clone $discount;
    }
public function addDiscountAdjustment(Adjustment $discount): void
    {
        foreach ($this->discounts as $d) {
            if ($d->isSameAs($discount)) {
                $d->addAmount($discount->getAmount());

                return;
            }
        }

        $this->discounts[] = clone $discount;
    }
public function addDiscountAdjustment ( Adjustment $ discount ) : void { foreach ( $ this -> discounts as $ d ) { if ( $ d -> isSameAs ( $ discount ) ) { $ d -> addAmount ( $ discount -> getAmount ( ) ) ; return ; } } $ this -> discounts [ ] = clone $ discount ; }
Adds the discount adjustment.

@param Adjustment $discount
Adds the discount adjustment .