| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 2 | public function create(Enviroment $enviroment) |
|
| 26 | { |
||
| 27 | 2 | $scheme = $enviroment->getRequestScheme(); |
|
| 28 | 2 | $host = $enviroment->getHost(); |
|
| 29 | 2 | $port = $enviroment->getPort(); |
|
| 30 | |||
| 31 | 2 | $path = parse_url('http://example.com' . $enviroment->getRequestUri(), PHP_URL_PATH); |
|
| 32 | 2 | $query = $enviroment->getQueryString(); |
|
| 33 | 2 | $user = $enviroment->getAuthUser(); |
|
| 34 | 2 | $pass = $enviroment->getAuthPassword(); |
|
| 35 | |||
| 36 | 2 | return new Uri($scheme, $host, $port, $path, $query, '', $user, $pass); |
|
| 37 | } |
||
| 38 | } |
||
| 39 |