| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 8 | public static function fromValue($value): Argument |
|
| 33 | { |
||
| 34 | 8 | if (!is_string($value)) { |
|
| 35 | 1 | throw new ValueNotSupported; |
|
| 36 | } |
||
| 37 | |||
| 38 | 7 | $value = Str::of($value); |
|
| 39 | |||
| 40 | 7 | if ((string) $value->substring(0, 4) !== '...$') { |
|
| 41 | 1 | throw new ValueNotSupported((string) $value); |
|
| 42 | } |
||
| 43 | |||
| 44 | 6 | return new self(new Name( |
|
| 45 | 6 | (string) $value->substring(4) |
|
| 46 | )); |
||
| 76 |