From edb52df83d591c2d69c77ee1d0c4355d4103c491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 4 Mar 2022 19:12:02 +0100 Subject: [PATCH] Add proper types to Room --- files/lib/data/room/Room.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/files/lib/data/room/Room.class.php b/files/lib/data/room/Room.class.php index d88f10b..a45307d 100644 --- a/files/lib/data/room/Room.class.php +++ b/files/lib/data/room/Room.class.php @@ -52,7 +52,7 @@ final class Room extends DatabaseObject implements /** * @see Room::getTitle() */ - public function __toString() + public function __toString(): string { return $this->getTitle(); } @@ -226,7 +226,7 @@ public function canWritePublicly(?UserProfile $user = null, ?\Exception &$reason /** * @inheritDoc */ - public function getTitle() + public function getTitle(): string { return WCF::getLanguage()->get($this->title); } @@ -234,7 +234,7 @@ public function getTitle() /** * @inheritDoc */ - public function getTopic() + public function getTopic(): string { $topic = StringUtil::trim(WCF::getLanguage()->get($this->topic)); @@ -247,6 +247,8 @@ public function getTopic() /** * Returns an array of users in this room. + * + * @return \chat\data\user\User[] */ public function getUsers() { @@ -277,7 +279,7 @@ public function getUsers() /** * @inheritDoc */ - public function getLink() + public function getLink(): string { return LinkHandler::getInstance()->getLink( 'Room',