| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 17 | public static function fromString(Str $value): Constructor |
|
| 29 | { |
||
| 30 | 17 | if (!$value->matches('~^set<\S+>$~')) { |
|
| 31 | 13 | throw new ValueNotSupported((string) $value); |
|
| 32 | } |
||
| 33 | |||
| 34 | 11 | $components = $value->capture('~^set<(?<type>\S+)>$~'); |
|
| 35 | |||
| 36 | 11 | return new self((string) $components->get('type')); |
|
| 37 | } |
||
| 57 |