2026-09-21 16:59:26 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-10-12 11:49:03 +02:00
|
|
|
namespace Domain\Models\ValueObjects\Coupon;
|
2026-09-21 16:59:26 +02:00
|
|
|
|
2026-10-12 11:49:03 +02:00
|
|
|
final readonly class CouponIncoCode
|
2026-09-21 16:59:26 +02:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @throws \DomainException
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
|
|
|
|
public int $value,
|
|
|
|
|
) {
|
|
|
|
|
if ($this->value <= 0) {
|
|
|
|
|
throw new \DomainException('Inco Code must be a positive integer.');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|