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