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