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 |
||
46 | 3 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
|
47 | { |
||
48 | 3 | if ($this->replace || $request->getUri()->getHost() === '') { |
|
49 | 2 | $uri = $request->getUri()->withHost($this->baseUri->getHost()); |
|
50 | 2 | $uri = $uri->withScheme($this->baseUri->getScheme()); |
|
51 | |||
52 | 2 | $request = $request->withUri($uri); |
|
53 | 2 | } |
|
54 | |||
55 | 3 | return $next($request); |
|
56 | } |
||
57 | |||
69 |