Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Uuid
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getRegularExpression
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\Core\Identifiers;
3
4use Apie\Core\Attributes\Description;
5use Apie\Core\ValueObjects\Interfaces\HasRegexValueObjectInterface;
6use Apie\Core\ValueObjects\IsStringWithRegexValueObject;
7
8#[Description('Uuid written in 8-4-4-4-12 text format')]
9class 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}