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