From 931a7533ce70f68b6890368220214e8d3f566180 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Nov 2021 20:53:30 +0300 Subject: adjust some return types in urlhelper --- classes/urlhelper.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'classes/urlhelper.php') diff --git a/classes/urlhelper.php b/classes/urlhelper.php index 351d66b8d..5d0d80a41 100644 --- a/classes/urlhelper.php +++ b/classes/urlhelper.php @@ -99,9 +99,8 @@ class UrlHelper { } } - // extended filtering involves validation for safe ports and loopback - /** - * @return bool|string false if something went wrong, otherwise the URL string + /** extended filtering involves validation for safe ports and loopback + * @return false|string false if something went wrong, otherwise the URL string */ static function validate(string $url, bool $extended_filtering = false) { @@ -166,7 +165,7 @@ class UrlHelper { } /** - * @return bool|string + * @return false|string */ static function resolve_redirects(string $url, int $timeout, int $nest = 0) { @@ -545,7 +544,7 @@ class UrlHelper { } /** - * @return bool|string false if the provided URL didn't match expected patterns, otherwise the video ID string + * @return false|string false if the provided URL didn't match expected patterns, otherwise the video ID string */ public static function url_to_youtube_vid(string $url) { $url = str_replace("youtube.com", "youtube-nocookie.com", $url); -- cgit v1.2.3