From: Tim Düsterhus Date: Thu, 11 Feb 2021 14:37:18 +0000 (+0100) Subject: Use proper return types in HttpFactory X-Git-Tag: 5.4.0_Alpha_1~285 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f20dccbb58131601921cce93c63ace4a54bcc1e;p=GitHub%2FWoltLab%2FWCF.git Use proper return types in HttpFactory --- diff --git a/wcfsetup/install/files/lib/system/io/HttpFactory.class.php b/wcfsetup/install/files/lib/system/io/HttpFactory.class.php index 205c50e8f7..a2da764c99 100644 --- a/wcfsetup/install/files/lib/system/io/HttpFactory.class.php +++ b/wcfsetup/install/files/lib/system/io/HttpFactory.class.php @@ -28,20 +28,16 @@ final class HttpFactory /** * Returns a RFC 7231#5.5.3 compatible user agent. - * - * @return string */ - public static function getDefaultUserAgent() + public static function getDefaultUserAgent(): string { return 'WoltLabSuite/' . \wcf\getMinorVersion(); } /** * Returns a reference to the default HTTP client. - * - * @return ClientInterface */ - public static function getDefaultClient() + public static function getDefaultClient(): ClientInterface { if (self::$defaultClient === null) { self::$defaultClient = static::makeClient(); @@ -56,10 +52,9 @@ final class HttpFactory * The HTTP proxy will automatically be enabled, unless * specifically removed by passing appropriate options. * - * @return ClientInterface * @see Client */ - public static function makeClient(array $options = []) + public static function makeClient(array $options = []): ClientInterface { $defaults = [ RequestOptions::PROXY => PROXY_SERVER_HTTP,