From 893d602cd96676810c25fc9b9a2e9360eebb898f Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Mon, 11 Mar 2024 14:22:53 +0100 Subject: [PATCH] refactor(validator): simplify return --- src/Validator/Host.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Validator/Host.php b/src/Validator/Host.php index 77078b2c..80fec5ec 100755 --- a/src/Validator/Host.php +++ b/src/Validator/Host.php @@ -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)); } /**