| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | 15 | public function __construct($value) |
|
| 11 | { |
||
| 12 | 15 | $filteredValue = parse_url($value, PHP_URL_PATH); |
|
| 13 | |||
| 14 | 15 | if (null === $filteredValue || strlen($filteredValue) != strlen($value)) { |
|
| 15 | 1 | throw new InvalidNativeArgumentException($value, array('string (valid url path)')); |
|
| 16 | } |
||
| 17 | |||
| 18 | 14 | $this->value = $filteredValue; |
|
| 19 | 14 | } |
|
| 20 | } |
||
| 21 |