$associatedProductsIds */ public function __construct( public Discount $discount, public DiscountType $type, public DiscountValue $value, public bool $is_old_price_displayed, public DatePeriod $period = new DatePeriod(), public array $associatedProductsIds = [], ) { Assert::same($this->type, $this->value->type, 'The discount value type must match the discount type.'); Assert::allString($this->associatedProductsIds); } }