Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
43 | 2 | public static function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): RdataInterface |
|
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 | $a = new self(); |
|
51 | 2 | $a->setAddress($address); |
|
52 | |||
53 | 2 | return $a; |
|
54 | } |
||
56 |