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