| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 5 | public function __construct(HeaderName $headerName, string $query) |
|
| 26 | { |
||
| 27 | 5 | if ($query === '' || strlen($query) !== strcspn($query, "\r\n")) { |
|
| 28 | 3 | throw new \InvalidArgumentException('CR and LF are not allowed in quoted strings'); |
|
| 29 | } |
||
| 30 | |||
| 31 | 2 | $this->headerName = $headerName; |
|
| 32 | 2 | $this->query = $query; |
|
| 33 | 2 | } |
|
| 34 | |||
| 46 | } |