Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
42 | 3 | public function setAcknowledgement(string $acknowledgement): SecurityTxt |
|
43 | { |
||
44 | 3 | if (filter_var($acknowledgement, FILTER_VALIDATE_URL) === false) { |
|
45 | 1 | throw new Exception('Acknowledgement must be a well-formed URL.'); |
|
46 | } |
||
47 | |||
48 | 2 | $this->acknowledgement = $acknowledgement; |
|
49 | |||
50 | 2 | return $this; |
|
|
|||
51 | } |
||
63 |