16 lines
292 B
PHP
16 lines
292 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Domain\Models\ValueObjects;
|
|
|
|
final readonly class IncoId
|
|
{
|
|
public function __construct(
|
|
public int $value
|
|
) {
|
|
if ($value <= 0) {
|
|
throw new \DomainException('IncoId must be a positive integer.');
|
|
}
|
|
}
|
|
}
|