Conditions | 5 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 5 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 16 | public function resolve($domain = '', $type = DNS_ANY) |
|
23 | { |
||
24 | 16 | if (empty($domain)) |
|
25 | 16 | return false; |
|
26 | |||
27 | 12 | $this->clear(); |
|
28 | |||
29 | 12 | $result = dns_get_record($domain, $type); |
|
30 | |||
31 | 12 | if (empty($result) || $result === false) { |
|
32 | 4 | return false; |
|
33 | } |
||
34 | |||
35 | 8 | foreach ($result as $record) { |
|
36 | 8 | $this->append($record); |
|
37 | 8 | } |
|
38 | |||
39 | 8 | return true; |
|
40 | } |
||
41 | |||
42 | } |