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