Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | final public static function fromString(string $value) |
||
27 | { |
||
28 | try { |
||
29 | static::uuidFromString(\sprintf('%s%s-%s-%s-%s-%s%s%s', ...\str_split($value, 4))); |
||
30 | } catch (\Exception $exception) { |
||
31 | throw new InvalidIdentityException( |
||
32 | \sprintf('Provided identity value "%s" is not a valid condensed UUID.', $value), |
||
33 | 0, |
||
34 | $exception |
||
35 | ); |
||
36 | } |
||
37 | |||
38 | return new static($value); |
||
39 | } |
||
57 |