Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function getRecord(string $hostname, int $type): array |
||
18 | { |
||
19 | $results = @dns_get_record($hostname, $type); |
||
20 | |||
21 | // this is untestable without creating a system networking failure |
||
22 | // @codeCoverageIgnoreStart |
||
23 | if ($results === false) { |
||
24 | throw new QueryFailure(); |
||
25 | } |
||
26 | // @codeCoverageIgnoreEnd |
||
27 | |||
28 | return $results; |
||
29 | } |
||
45 |