Skip to content

Commit 6ef67e1

Browse files
committed
Formatting fix
1 parent 21a94fc commit 6ef67e1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/DNS/Validator/DNS.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ public function __construct(protected string $target, protected string $type = s
4343
{
4444
if (!filter_var($dnsServer, FILTER_VALIDATE_IP)) {
4545
$dns = new Client(self::DEFAULT_DNS_SERVER);
46-
$question = new Question($dnsServer, Record::typeNameToCode('A')); // TODO: ipv6 support
46+
$question = new Question($dnsServer, Record::TYPE_A); // TODO: ipv6 support
4747
$query = Message::query($question, recursionDesired: true);
4848
$response = $dns->query($query);
4949
$answer = $response->answers[0] ?? null;
5050
$aRecord = $answer->rdata ?? '';
51-
52-
if(empty($aRecord)) {
51+
52+
if (empty($aRecord)) {
5353
throw new \Exception('Invalid DNS server.');
5454
}
55-
55+
5656
$this->dnsServer = $aRecord;
5757
}
5858
}

0 commit comments

Comments
 (0)