Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 0 |
1 | <?php |
||
29 | 2 | public static function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): RdataInterface |
|
30 | { |
||
31 | 2 | if (false === $address = @inet_ntop(substr($rdata, $offset, 16))) { |
|
32 | throw new DecodeException(static::TYPE, $rdata); |
||
33 | } |
||
34 | 2 | $offset += 16; |
|
35 | |||
36 | 2 | $a = new static(); |
|
37 | 2 | $a->setAddress($address); |
|
38 | |||
39 | 2 | return $a; |
|
40 | } |
||
42 |