| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 59 | 54 | public function toPsrUri($uri) |
|
| 60 | { |
||
| 61 | 54 | if ($uri instanceof UriInterface) { |
|
| 62 | 17 | return $uri; |
|
| 63 | 54 | } elseif (is_string($uri)) { |
|
| 64 | 53 | return new Uri($uri); |
|
| 65 | } |
||
| 66 | |||
| 67 | 1 | throw new InvalidArgumentException('URI must be a string or an instance of \Psr\Http\Message\UriInterface.'); |
|
| 68 | } |
||
| 70 |