ldc-mesbr-app/src/Domain/Models/ValueObjects/Actor/ActorDisplayName.php

19 lines
345 B
PHP
Raw Normal View History

2026-09-23 15:31:51 +02:00
<?php
declare(strict_types=1);
namespace Domain\Models\ValueObjects\Actor;
final readonly class ActorDisplayName
{
public function __construct(
public string $value,
) {
$trimmed = trim($value);
if ($trimmed === '') {
throw new \DomainException('Display name cannot be empty.');
}
}
}