Skip to content

Commit

Permalink
No need to cast anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioribeiro committed Aug 16, 2024
1 parent 1316e81 commit fc4fd60
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Support/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,6 @@ public static function parseUrl(string|null $url): array
$url = '';
}

try {
/** @throws Throwable */
$url = (string) $url;
} catch (Throwable) {
$url = '';
}

/** Check if the string only a domain name **/
if (filter_var($url, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) === $url) {
$url = "https://$url";
Expand Down

0 comments on commit fc4fd60

Please sign in to comment.