2026-09-21 16:59:26 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Domain\Models\ValueObjects;
|
|
|
|
|
|
|
|
|
|
final readonly class CouponName
|
|
|
|
|
{
|
|
|
|
|
public function __construct(
|
|
|
|
|
public string $value,
|
|
|
|
|
) {
|
2026-09-24 15:24:54 +02:00
|
|
|
if (mb_trim($this->value) === '') {
|
2026-09-21 16:59:26 +02:00
|
|
|
throw new \DomainException('Coupon name cannot be empty.');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|