Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
51 | 3 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
|
52 | { |
||
53 | 3 | if ($this->replace || $request->getUri()->getHost() === '') { |
|
54 | 2 | $uri = $request->getUri()->withHost($this->host->getHost()); |
|
55 | 2 | $uri = $uri->withScheme($this->host->getScheme()); |
|
56 | |||
57 | 2 | $request = $request->withUri($uri); |
|
58 | 2 | } |
|
59 | |||
60 | 3 | return $next($request); |
|
61 | } |
||
62 | |||
74 |