Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
43 | 2 | public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void |
|
44 | { |
||
45 | 2 | if (false === $address = @inet_ntop(substr($rdata, $offset, 16))) { |
|
46 | 1 | throw new DecodeException(static::TYPE, $rdata); |
|
47 | } |
||
48 | 2 | $offset += 16; |
|
49 | |||
50 | 2 | $this->setAddress($address); |
|
51 | 2 | } |
|
53 |