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:
parent
dee22a8547
commit
edb52df83d
@ -52,7 +52,7 @@ final class Room extends DatabaseObject implements
|
|||||||
/**
|
/**
|
||||||
* @see Room::getTitle()
|
* @see Room::getTitle()
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString(): string
|
||||||
{
|
{
|
||||||
return $this->getTitle();
|
return $this->getTitle();
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ public function canWritePublicly(?UserProfile $user = null, ?\Exception &$reason
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function getTitle()
|
public function getTitle(): string
|
||||||
{
|
{
|
||||||
return WCF::getLanguage()->get($this->title);
|
return WCF::getLanguage()->get($this->title);
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ public function getTitle()
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function getTopic()
|
public function getTopic(): string
|
||||||
{
|
{
|
||||||
$topic = StringUtil::trim(WCF::getLanguage()->get($this->topic));
|
$topic = StringUtil::trim(WCF::getLanguage()->get($this->topic));
|
||||||
|
|
||||||
@ -247,6 +247,8 @@ public function getTopic()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of users in this room.
|
* Returns an array of users in this room.
|
||||||
|
*
|
||||||
|
* @return \chat\data\user\User[]
|
||||||
*/
|
*/
|
||||||
public function getUsers()
|
public function getUsers()
|
||||||
{
|
{
|
||||||
@ -277,7 +279,7 @@ public function getUsers()
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function getLink()
|
public function getLink(): string
|
||||||
{
|
{
|
||||||
return LinkHandler::getInstance()->getLink(
|
return LinkHandler::getInstance()->getLink(
|
||||||
'Room',
|
'Room',
|
||||||
|
Loading…
Reference in New Issue
Block a user