isNegative()) { throw new \DomainException('basePriceHt cannot be negative'); } if ($basePriceTtc->isNegative()) { throw new \DomainException('basePriceTtc cannot be negative'); } if ($discountAmountHt->isNegative()) { throw new \DomainException('discountAmountHt cannot be negative'); } if ($discountedPriceHt->isNegative()) { throw new \DomainException('discountedPriceHt cannot be negative'); } if ($discountedPriceTtc->isNegative()) { throw new \DomainException('discountedPriceTtc cannot be negative'); } if ($priceKgTtc->isNegative()) { throw new \DomainException('priceKgTtc cannot be negative'); } } public function basePriceHt(): Money { return $this->basePriceHt; } public function basePriceTtc(): Money { return $this->basePriceTtc; } public function discountAmountHt(): Money { return $this->discountAmountHt; } public function discountedPriceHt(): Money { return $this->discountedPriceHt; } public function discountedPriceTtc(): Money { return $this->discountedPriceTtc; } public function priceKgTtc(): Money { return $this->priceKgTtc; } }