From: Tim Düsterhus Date: Fri, 4 Jun 2021 10:22:47 +0000 (+0200) Subject: Mark `\wcf\util\UserAgent` as final X-Git-Tag: 5.4.0_Beta_2~31^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc07ff4f6ac85cd6ae3cbf3503752c9c5ffc74ea;p=GitHub%2FWoltLab%2FWCF.git Mark `\wcf\util\UserAgent` as final --- diff --git a/wcfsetup/install/files/lib/util/UserAgent.class.php b/wcfsetup/install/files/lib/util/UserAgent.class.php index 00e424e284..9183975049 100644 --- a/wcfsetup/install/files/lib/util/UserAgent.class.php +++ b/wcfsetup/install/files/lib/util/UserAgent.class.php @@ -11,27 +11,27 @@ namespace wcf\util; * @package WoltLabSuite\Core\Util * @since 5.4 */ -class UserAgent +final class UserAgent { /** * @var string */ - protected $userAgent; + private $userAgent; /** * @var ?string */ - protected $browser; + private $browser; /** * @var ?string */ - protected $browserVersion; + private $browserVersion; /** * @var ?string */ - protected $os; + private $os; public function __construct(string $userAgent) { @@ -44,7 +44,7 @@ class UserAgent /** * Detects the browser on the basis of the user agent. */ - protected function detectBrowser(): void + private function detectBrowser(): void { // lunascape if (\preg_match('~lunascape[ /]([\d\.]+)~i', $this->userAgent, $match)) { @@ -314,7 +314,7 @@ class UserAgent /** * Detects the OS on the basis of the user agent. */ - protected function detectOs(): void + private function detectOs(): void { // iOS if (\preg_match('/iphone/i', $this->userAgent)) {