Skip to content

Commit 1b0850e

Browse files
committed
refactor: simplify return statement
1 parent 019ea5a commit 1b0850e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

system/Validation/FormatRules.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,8 @@ public function valid_url_strict(?string $str = null, ?string $validSchemes = nu
311311
strtolower($validSchemes ?? 'http,https,mailto,tel,sms')
312312
);
313313

314-
return ! in_array($scheme, $validSchemes, true)
315-
? false
316-
: filter_var($str, FILTER_VALIDATE_URL) !== false;
314+
return in_array($scheme, $validSchemes, true)
315+
&& filter_var($str, FILTER_VALIDATE_URL) !== false;
317316
}
318317

319318
/**

0 commit comments

Comments
 (0)