ldc-arcadia-genesis-php-client/src/Lib/ApiValueObject/ArcadiaEmployeeId.php
Jérémy Munsch 9c47b9cd66
refactor: rename namespace from ArcadiaGenesisPhpClient to ArcadiaApiPhpClient
This change updates the namespace across multiple files to reflect the new naming convention.
2026-09-11 16:55:12 +02:00

23 lines
590 B
PHP

<?php
declare(strict_types=1);
namespace Uwil\ArcadiaApiPhpClient\Lib\ApiValueObject;
use Uwil\ArcadiaApiPhpClient\Exception\DomainException;
use Uwil\ArcadiaApiPhpClient\Lib\ValueObjectId;
final readonly class ArcadiaEmployeeId implements ValueObjectId
{
private const PATTERN = '/^\d{7, 8}$/';
public function __construct(
public readonly string $value
) {
if (! preg_match(self::PATTERN, $value)) {
throw new DomainException(
"Invalid value '{$value}' does not match pattern " . self::PATTERN
);
}
}
}