Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 17 |
|
0.00% |
0 / 17 |
CRAP | |
0.00% |
0 / 1 |
| Uri | |
0.00% |
0 / 17 |
|
0.00% |
0 / 17 |
306 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getScheme | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getAuthority | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getUserInfo | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getHost | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPort | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPath | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getQuery | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getFragment | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| withScheme | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| withUserInfo | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| withHost | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| withPort | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| withPath | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| withQuery | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| withFragment | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| __toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace pvc\http\psr7; |
| 4 | |
| 5 | use Psr\Http\Message\UriInterface; |
| 6 | use GuzzleHttp\Psr7\Uri as GuzzleUri; |
| 7 | class Uri implements UriInterface |
| 8 | { |
| 9 | public function __construct(protected GuzzleUri $uri) {} |
| 10 | public function getScheme(): string |
| 11 | { |
| 12 | return $this->uri->getScheme(); |
| 13 | } |
| 14 | |
| 15 | public function getAuthority(): string |
| 16 | { |
| 17 | return $this->uri->getAuthority(); |
| 18 | } |
| 19 | |
| 20 | public function getUserInfo(): string |
| 21 | { |
| 22 | return $this->uri->getUserInfo(); |
| 23 | } |
| 24 | |
| 25 | public function getHost(): string |
| 26 | { |
| 27 | return $this->uri->getHost(); |
| 28 | } |
| 29 | |
| 30 | public function getPort(): ?int |
| 31 | { |
| 32 | return $this->uri->getPort(); |
| 33 | } |
| 34 | |
| 35 | public function getPath(): string |
| 36 | { |
| 37 | return $this->uri->getPath(); |
| 38 | } |
| 39 | |
| 40 | public function getQuery(): string |
| 41 | { |
| 42 | return $this->uri->getQuery(); |
| 43 | } |
| 44 | |
| 45 | public function getFragment(): string |
| 46 | { |
| 47 | return $this->uri->getFragment(); |
| 48 | } |
| 49 | |
| 50 | public function withScheme(string $scheme): UriInterface |
| 51 | { |
| 52 | return $this->uri->withScheme($scheme); |
| 53 | } |
| 54 | |
| 55 | public function withUserInfo( |
| 56 | string $user, |
| 57 | ?string $password = null |
| 58 | ): UriInterface { |
| 59 | return $this->uri->withUserInfo($user, $password); |
| 60 | } |
| 61 | |
| 62 | public function withHost(string $host): UriInterface |
| 63 | { |
| 64 | return $this->uri->withHost($host); |
| 65 | } |
| 66 | |
| 67 | public function withPort(?int $port): UriInterface |
| 68 | { |
| 69 | return $this->uri->withPort($port); |
| 70 | } |
| 71 | |
| 72 | public function withPath(string $path): UriInterface |
| 73 | { |
| 74 | return $this->uri->withPath($path); |
| 75 | } |
| 76 | |
| 77 | public function withQuery(string $query): UriInterface |
| 78 | { |
| 79 | return $this->uri->withQuery($query); |
| 80 | } |
| 81 | |
| 82 | public function withFragment(string $fragment): UriInterface |
| 83 | { |
| 84 | return $this->uri->withFragment($fragment); |
| 85 | } |
| 86 | |
| 87 | public function __toString(): string |
| 88 | { |
| 89 | return $this->uri->__toString(); |
| 90 | } |
| 91 | } |