Skip to content

Commit

Permalink
refactor(validator): simplify return
Browse files Browse the repository at this point in the history
  • Loading branch information
stnguyen90 committed Mar 11, 2024
1 parent 87525cb commit 893d602
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Validator/Host.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ public function isValid($value): bool

$hostnameValidator = new Hostname($this->whitelist);

if (!$hostnameValidator->isValid(\parse_url($value, PHP_URL_HOST))) {
return false;
}

return true;
return $hostnameValidator->isValid(\parse_url($value, PHP_URL_HOST));
}

/**
Expand Down

0 comments on commit 893d602

Please sign in to comment.