Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Uuid | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| getRegularExpression | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Identifiers; |
| 3 | |
| 4 | use Apie\Core\Attributes\Description; |
| 5 | use Apie\Core\ValueObjects\Interfaces\HasRegexValueObjectInterface; |
| 6 | use Apie\Core\ValueObjects\IsStringWithRegexValueObject; |
| 7 | |
| 8 | #[Description('Uuid written in 8-4-4-4-12 text format')] |
| 9 | class Uuid implements HasRegexValueObjectInterface |
| 10 | { |
| 11 | use IsStringWithRegexValueObject; |
| 12 | |
| 13 | public static function getRegularExpression(): string |
| 14 | { |
| 15 | return '/^[a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12}$/'; |
| 16 | } |
| 17 | } |