| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 1 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 21 | { |
||
| 22 | 1 | $uri = $request->getUri(); |
|
| 23 | 1 | $path = $uri->getPath(); |
|
| 24 | |||
| 25 | // If the path starts with the old prefix, replace it by the new one |
||
| 26 | 1 | return $handler->handle( |
|
| 27 | 1 | $request->withUri($uri->withPath(\str_replace(self::OLD_PATH_PREFIX, self::NEW_PATH_PREFIX, $path))) |
|
| 28 | ); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |