Conditions | 4 |
Paths | 8 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
56 | 22 | public static function fromUri(UriInterface $uri): self |
|
57 | { |
||
58 | 22 | $me = new self(); |
|
59 | 22 | $me->raw = $uri->__toString(); |
|
60 | 22 | $me->protocol = $uri->getScheme(); |
|
61 | 22 | $me->full = $uri->__toString(); |
|
62 | 22 | $me->hostname = $uri->getHost(); |
|
63 | 22 | $me->port = $uri->getPort() ? (string) $uri->getPort() : null; |
|
64 | 22 | $me->path = $uri->getPath(); |
|
65 | 22 | $me->query = $uri->getQuery() ?: null; |
|
66 | 22 | $me->fragment = $uri->getFragment() ?: null; |
|
67 | |||
68 | 22 | return $me; |
|
69 | } |
||
70 | |||
88 |