Conditions | 3 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function toDNSRecord(): DNSRecord |
||
12 | { |
||
13 | $type = new DNSRecordType($this->fields[3]); |
||
14 | if ($type->isA(DNSRecordType::TYPE_A) || $type->isA(DNSRecordType::TYPE_AAAA)) { |
||
15 | return DNSRecord::createFromPrimitives( |
||
16 | $this->fields[3], |
||
17 | (string)$this->fields[0], |
||
18 | (int)$this->fields[1], |
||
19 | $this->fields[4] |
||
20 | ); |
||
21 | } |
||
22 | |||
23 | return DNSRecord::createFromPrimitives( |
||
24 | $this->fields[3], |
||
25 | (string)$this->fields[0], |
||
26 | (int)$this->fields[1], |
||
27 | null, |
||
28 | 'IN', |
||
29 | $this->fields[4] |
||
30 | ); |
||
33 |