Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | class AAAA extends A |
||
22 | { |
||
23 | const TYPE = 'AAAA'; |
||
24 | const TYPE_CODE = 28; |
||
25 | |||
26 | /** |
||
27 | * @param string $address |
||
28 | */ |
||
29 | 25 | public function setAddress(string $address): void |
|
30 | { |
||
31 | 25 | if (!Validator::ipv6($address)) { |
|
32 | 1 | throw new \InvalidArgumentException(sprintf('The address "%s" is not a valid IPv6 address.', $address)); |
|
33 | } |
||
34 | |||
35 | 25 | $this->address = $address; |
|
36 | 25 | } |
|
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | * |
||
41 | * @throws DecodeException |
||
42 | */ |
||
43 | 2 | public static function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): RdataInterface |
|
54 | } |
||
55 | } |
||
56 |