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