| Conditions | 4 |
| Paths | 6 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4.3731 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 2 | public static function checkA(string $hostname): bool |
|
| 25 | { |
||
| 26 | try { |
||
| 27 | 2 | if (!@dns_check_record($hostname, 'A')) { |
|
| 28 | 2 | return false; |
|
| 29 | } |
||
| 30 | 1 | $result = @dns_get_record($hostname, DNS_A); |
|
| 31 | 1 | return $result !== false && count($result) > 0; |
|
| 32 | } catch (\Throwable $t) { |
||
| 33 | } |
||
| 34 | return false; |
||
| 35 | } |
||
| 44 | } |