16 lines
327 B
PHP
16 lines
327 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Domain\Models\ValueObjects\Coupon;
|
|
|
|
final readonly class CouponQuantity
|
|
{
|
|
public function __construct(
|
|
public int $quantity,
|
|
) {
|
|
if ($this->quantity <= 0) {
|
|
throw new \DomainException('CouponQuantity quantity must be positive.');
|
|
}
|
|
}
|
|
}
|