| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 9 | public function __construct(UriInterface $uri) |
|
| 25 | { |
||
| 26 | 9 | if ($uri->getPath() === '') { |
|
| 27 | 1 | throw new \LogicException('URI path cannot be empty'); |
|
| 28 | } |
||
| 29 | |||
| 30 | 8 | if (substr($uri->getPath(), -1) === '/') { |
|
| 31 | 1 | throw new \LogicException('URI path cannot end with a slash.'); |
|
| 32 | } |
||
| 33 | |||
| 34 | 7 | $this->uri = $uri; |
|
| 35 | 7 | } |
|
| 36 | |||
| 49 |