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