| Conditions | 3 | 
| Paths | 2 | 
| Total Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 30 | public static function fromString(string $value) | ||
| 31 |     { | ||
| 32 | $uuid = (new ShortUuid())->decode($value); | ||
| 33 |         if ($uuid->getVariant() !== Uuid::RFC_4122 || !\in_array($uuid->getVersion(), \range(1, 5), true)) { | ||
| 34 | throw new InvalidIdentityException( | ||
| 35 |                 \sprintf('Provided identity value "%s" is not a valid short UUID', $value) | ||
| 36 | ); | ||
| 37 | } | ||
| 38 | |||
| 39 | return new static($value); | ||
| 40 | } | ||
| 41 | } | ||
| 42 |