From: Tim Düsterhus Date: Mon, 8 Aug 2022 09:11:52 +0000 (+0200) Subject: Use typed properties in Session class X-Git-Tag: 6.0.0_Alpha_1~1064 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d2da94e5eeb34caca64b0ef94c83b9a6ee1164d;p=GitHub%2FWoltLab%2FWCF.git Use typed properties in Session class --- diff --git a/wcfsetup/install/files/lib/system/session/Session.class.php b/wcfsetup/install/files/lib/system/session/Session.class.php index a54b51b5c5..89196275e0 100644 --- a/wcfsetup/install/files/lib/system/session/Session.class.php +++ b/wcfsetup/install/files/lib/system/session/Session.class.php @@ -21,10 +21,7 @@ final class Session */ private $data; - /** - * @var UserAgent - */ - private $userAgent; + private UserAgent $userAgent; /** * Session constructor. @@ -90,7 +87,7 @@ final class Session */ public function getUserAgent(): UserAgent { - if ($this->userAgent === null) { + if (!isset($this->userAgent)) { $this->userAgent = new UserAgent($this->data['userAgent']); }