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