This change updates the namespace across multiple files to reflect the new naming convention.
23 lines
590 B
PHP
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
|
|
);
|
|
}
|
|
}
|
|
}
|