Skip to content

Commit d6d36b4

Browse files
committed
cs fix
1 parent 7e7d1f0 commit d6d36b4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/Network/DNSLookup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class DNSLookup
66
{
7-
public function getIPs($hostname): array
7+
public function getIPs(string $hostname): array
88
{
99
// IP as host given
1010
$ips = filter_var($hostname, FILTER_VALIDATE_IP) ? [$hostname] : [];

app/Rules/RemoteURL.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ class RemoteURL implements ValidationRule
1616
*/
1717
public function validate(string $attribute, mixed $value, Closure $fail): void
1818
{
19+
if (!is_string($value)) {
20+
$fail("Invalid URL: URL must be a string.");
21+
}
22+
1923
$host = parse_url($value, PHP_URL_HOST);
2024
$ips = App::make(DNSLookup::class)->getIPs($host);
2125

0 commit comments

Comments
 (0)