mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-11-16 16:30:09 +00:00
Add proper return types to all MessageTypes
This commit is contained in:
parent
9119b4ab22
commit
164e1ab1c6
@ -42,7 +42,7 @@ public function __construct()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Plain';
|
||||
}
|
||||
@ -50,13 +50,13 @@ public function getJavaScriptModuleName()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canDelete(Message $message, ?UserProfile $user = null)
|
||||
public function canDelete(Message $message, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
}
|
||||
|
||||
return $user->getPermission('mod.chat.canDelete');
|
||||
return !!$user->getPermission('mod.chat.canDelete');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@ final class AwayMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Away';
|
||||
}
|
||||
@ -39,7 +39,7 @@ public function getJavaScriptModuleName()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -63,7 +63,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -87,7 +87,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ final class BackMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Back';
|
||||
}
|
||||
@ -39,7 +39,7 @@ public function getJavaScriptModuleName()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -63,7 +63,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -87,7 +87,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public function __construct()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Broadcast';
|
||||
}
|
||||
@ -55,7 +55,7 @@ public function getPayload(Message $message, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -75,7 +75,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -95,19 +95,19 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canDelete(Message $message, ?UserProfile $user = null)
|
||||
public function canDelete(Message $message, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
}
|
||||
|
||||
return $user->getPermission('mod.chat.canDelete');
|
||||
return !!$user->getPermission('mod.chat.canDelete');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ final class ChatUpdateMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/ChatUpdate';
|
||||
}
|
||||
@ -37,7 +37,7 @@ public function getJavaScriptModuleName()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -45,7 +45,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -53,7 +53,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ final class ColorMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Color';
|
||||
}
|
||||
@ -39,7 +39,7 @@ public function getJavaScriptModuleName()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -59,7 +59,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -67,7 +67,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ final class InfoMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Info';
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ final class JoinMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Join';
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ final class LeaveMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Leave';
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ final class MeMessageType implements IMessageType, IDeletableMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Me';
|
||||
}
|
||||
@ -38,12 +38,12 @@ public function getJavaScriptModuleName()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canDelete(Message $message, ?UserProfile $user = null)
|
||||
public function canDelete(Message $message, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
}
|
||||
|
||||
return $user->getPermission('mod.chat.canDelete');
|
||||
return !!$user->getPermission('mod.chat.canDelete');
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public function __construct()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Plain';
|
||||
}
|
||||
@ -50,13 +50,13 @@ public function getJavaScriptModuleName()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canDelete(Message $message, ?UserProfile $user = null)
|
||||
public function canDelete(Message $message, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
}
|
||||
|
||||
return $user->getPermission('mod.chat.canDelete');
|
||||
return !!$user->getPermission('mod.chat.canDelete');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@ final class SuspendMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Suspend';
|
||||
}
|
||||
@ -59,7 +59,7 @@ public function getPayload(Message $message, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -79,7 +79,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -99,7 +99,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ trait TCanSeeCreator
|
||||
/**
|
||||
* @see \chat\system\message\type\IMessageType::canSee()
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -50,7 +50,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @see \chat\system\message\type\IMessageType::canSeeInLog()
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -70,7 +70,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @see \chat\system\message\type\IMessageType::supportsFastSelect()
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
$parameters = [
|
||||
'result' => true,
|
||||
|
@ -29,7 +29,7 @@ trait TCanSeeInSameRoom
|
||||
/**
|
||||
* @see \chat\system\message\type\IMessageType::canSee()
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -49,7 +49,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @see \chat\system\message\type\IMessageType::canSeeInLog()
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -69,7 +69,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @see \chat\system\message\type\IMessageType::supportsFastSelect()
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
$parameters = [
|
||||
'result' => true,
|
||||
|
@ -39,7 +39,7 @@ public function __construct()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Team';
|
||||
}
|
||||
@ -55,19 +55,19 @@ public function getPayload(Message $message, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canDelete(Message $message, ?UserProfile $user = null)
|
||||
public function canDelete(Message $message, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
}
|
||||
|
||||
return $user->getPermission('mod.chat.canDelete');
|
||||
return !!$user->getPermission('mod.chat.canDelete');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -77,7 +77,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
'message' => $message,
|
||||
'room' => $room,
|
||||
'user' => $user,
|
||||
'canSee' => $user->getPermission('mod.chat.canTeam'),
|
||||
'canSee' => !!$user->getPermission('mod.chat.canTeam'),
|
||||
];
|
||||
EventHandler::getInstance()->fireAction($this, 'canSee', $parameters);
|
||||
|
||||
@ -87,7 +87,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -97,7 +97,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
'message' => $message,
|
||||
'room' => $room,
|
||||
'user' => $user,
|
||||
'canSee' => $user->getPermission('mod.chat.canTeam'),
|
||||
'canSee' => !!$user->getPermission('mod.chat.canTeam'),
|
||||
];
|
||||
EventHandler::getInstance()->fireAction($this, 'canSeeInLog', $parameters);
|
||||
|
||||
@ -107,7 +107,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ final class TemproomCreatedMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/TemproomCreated';
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ final class TemproomInvitedMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/TemproomInvited';
|
||||
}
|
||||
@ -64,7 +64,7 @@ public function getPayload(Message $message, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -84,7 +84,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -104,7 +104,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
$parameters = [
|
||||
'result' => false,
|
||||
|
@ -31,7 +31,7 @@ final class TombstoneMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Tombstone';
|
||||
}
|
||||
@ -39,7 +39,7 @@ public function getJavaScriptModuleName()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -59,7 +59,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -67,7 +67,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ final class UnsuspendMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Unsuspend';
|
||||
}
|
||||
@ -59,7 +59,7 @@ public function getPayload(Message $message, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -79,7 +79,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -99,7 +99,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ final class WhereMessageType implements IMessageType
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Where';
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public function __construct()
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJavaScriptModuleName()
|
||||
public function getJavaScriptModuleName(): string
|
||||
{
|
||||
return 'Bastelstu.be/Chat/MessageType/Whisper';
|
||||
}
|
||||
@ -91,7 +91,7 @@ public function getPayload(Message $message, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSee(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -111,7 +111,7 @@ public function canSee(Message $message, Room $room, ?UserProfile $user = null)
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null)
|
||||
public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = new UserProfile(WCF::getUser());
|
||||
@ -131,7 +131,7 @@ public function canSeeInLog(Message $message, Room $room, ?UserProfile $user = n
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function supportsFastSelect()
|
||||
public function supportsFastSelect(): bool
|
||||
{
|
||||
$parameters = [
|
||||
'result' => false,
|
||||
|
Loading…
Reference in New Issue
Block a user