| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 13 | public function __invoke(PathInterface $from, PathInterface $to): PathInterface |
|
| 38 | { |
||
| 39 | 13 | $target = Str::of((string) $to); |
|
| 40 | |||
| 41 | 13 | if (!$target->matches('|^@[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+/.+|')) { |
|
| 42 | 8 | throw new ValueNotSupported((string) $to); |
|
| 43 | } |
||
| 44 | |||
| 45 | 5 | return new Path( |
|
| 46 | 5 | (string) $this->vendorPath->append((string) $target->substring(1)) |
|
| 47 | ); |
||
| 50 |