1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-21 21:30:08 +00:00

Add proper types to Room

This commit is contained in:
Tim Düsterhus 2022-03-04 19:12:02 +01:00
parent dee22a8547
commit edb52df83d
Signed by: TimWolla
GPG Key ID: 8FF75566094168AF

View File

@ -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',