public function __construct(CouponInterface $coupon, $minimumQuantity) { if (!is_int($minimumQuantity)) { throw new \InvalidArgumentException('$quantity must be a valid integer.'); } if ($minimumQuantity < 1) { throw new \InvalidArgumentException('$quantity must be at least one.'); } parent::__construct($coupon); $this->minimumQuantity = $minimumQuantity; }
public function __construct(CouponInterface $coupon, Money $minimumAmount) { parent::__construct($coupon); $this->minimumAmount = $minimumAmount; }