| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 32 | public function __construct(UriInterface $uri) |
||
| 33 | { |
||
| 34 | if ('' === $uri->getPath()) { |
||
| 35 | throw new \InvalidArgumentException('URI path cannot be empty'); |
||
| 36 | } |
||
| 37 | if ('/' === substr($uri->getPath(), -1)) { |
||
| 38 | $uri = $uri->withPath(rtrim($uri->getPath(), '/')); |
||
| 39 | } |
||
| 40 | $this->uri = $uri; |
||
| 41 | } |
||
| 57 |