public function setEffects(array $effects)
    {
        // Amount is now optionnal.
        $this->amount = isset($effects['amount']) ? $effects['amount'] : 0;

        $this->effects = $effects;
    }
public function setEffects(array $effects)
    {
        // Amount is now optionnal.
        $this->amount = isset($effects['amount']) ? $effects['amount'] : 0;

        $this->effects = $effects;
    }
public function setEffects ( array $ effects ) { // Amount is now optionnal. $ this -> amount = isset ( $ effects [ 'amount' ] ) ? $ effects [ 'amount' ] : 0 ; $ this -> effects = $ effects ; }
Set effects ready to be serialized

@param  array                                            $effects Effect ready to be serialized
Needs at least the key 'amount'
with the amount removed from the cart
@throws \Thelia\Model\Exception\InvalidArgumentException
Set effects ready to be serialized