diff --git a/files/lib/system/message/type/AttachmentMessageType.class.php b/files/lib/system/message/type/AttachmentMessageType.class.php index dc4ba12..0212493 100644 --- a/files/lib/system/message/type/AttachmentMessageType.class.php +++ b/files/lib/system/message/type/AttachmentMessageType.class.php @@ -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'); } /** diff --git a/files/lib/system/message/type/AwayMessageType.class.php b/files/lib/system/message/type/AwayMessageType.class.php index c69818b..3718df5 100644 --- a/files/lib/system/message/type/AwayMessageType.class.php +++ b/files/lib/system/message/type/AwayMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/BackMessageType.class.php b/files/lib/system/message/type/BackMessageType.class.php index 47dfd90..f9bf3ef 100644 --- a/files/lib/system/message/type/BackMessageType.class.php +++ b/files/lib/system/message/type/BackMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/BroadcastMessageType.class.php b/files/lib/system/message/type/BroadcastMessageType.class.php index e425c68..bbd74a9 100644 --- a/files/lib/system/message/type/BroadcastMessageType.class.php +++ b/files/lib/system/message/type/BroadcastMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/ChatUpdateMessageType.class.php b/files/lib/system/message/type/ChatUpdateMessageType.class.php index 7ed0589..7d79283 100644 --- a/files/lib/system/message/type/ChatUpdateMessageType.class.php +++ b/files/lib/system/message/type/ChatUpdateMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/ColorMessageType.class.php b/files/lib/system/message/type/ColorMessageType.class.php index 026ea7f..9459c09 100644 --- a/files/lib/system/message/type/ColorMessageType.class.php +++ b/files/lib/system/message/type/ColorMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/InfoMessageType.class.php b/files/lib/system/message/type/InfoMessageType.class.php index 12eb9f7..dd49dbc 100644 --- a/files/lib/system/message/type/InfoMessageType.class.php +++ b/files/lib/system/message/type/InfoMessageType.class.php @@ -26,7 +26,7 @@ final class InfoMessageType implements IMessageType /** * @inheritDoc */ - public function getJavaScriptModuleName() + public function getJavaScriptModuleName(): string { return 'Bastelstu.be/Chat/MessageType/Info'; } diff --git a/files/lib/system/message/type/JoinMessageType.class.php b/files/lib/system/message/type/JoinMessageType.class.php index d66f4df..705a151 100644 --- a/files/lib/system/message/type/JoinMessageType.class.php +++ b/files/lib/system/message/type/JoinMessageType.class.php @@ -26,7 +26,7 @@ final class JoinMessageType implements IMessageType /** * @inheritDoc */ - public function getJavaScriptModuleName() + public function getJavaScriptModuleName(): string { return 'Bastelstu.be/Chat/MessageType/Join'; } diff --git a/files/lib/system/message/type/LeaveMessageType.class.php b/files/lib/system/message/type/LeaveMessageType.class.php index 63670dd..43781e2 100644 --- a/files/lib/system/message/type/LeaveMessageType.class.php +++ b/files/lib/system/message/type/LeaveMessageType.class.php @@ -26,7 +26,7 @@ final class LeaveMessageType implements IMessageType /** * @inheritDoc */ - public function getJavaScriptModuleName() + public function getJavaScriptModuleName(): string { return 'Bastelstu.be/Chat/MessageType/Leave'; } diff --git a/files/lib/system/message/type/MeMessageType.class.php b/files/lib/system/message/type/MeMessageType.class.php index fd9fd3a..0562a09 100644 --- a/files/lib/system/message/type/MeMessageType.class.php +++ b/files/lib/system/message/type/MeMessageType.class.php @@ -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'); } } diff --git a/files/lib/system/message/type/PlainMessageType.class.php b/files/lib/system/message/type/PlainMessageType.class.php index 5128d53..897ebd1 100644 --- a/files/lib/system/message/type/PlainMessageType.class.php +++ b/files/lib/system/message/type/PlainMessageType.class.php @@ -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'); } /** diff --git a/files/lib/system/message/type/SuspendMessageType.class.php b/files/lib/system/message/type/SuspendMessageType.class.php index 1d9e08e..e3f657a 100644 --- a/files/lib/system/message/type/SuspendMessageType.class.php +++ b/files/lib/system/message/type/SuspendMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/TCanSeeCreator.class.php b/files/lib/system/message/type/TCanSeeCreator.class.php index 81e423a..442b528 100644 --- a/files/lib/system/message/type/TCanSeeCreator.class.php +++ b/files/lib/system/message/type/TCanSeeCreator.class.php @@ -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, diff --git a/files/lib/system/message/type/TCanSeeInSameRoom.class.php b/files/lib/system/message/type/TCanSeeInSameRoom.class.php index 6f3172e..a74ab40 100644 --- a/files/lib/system/message/type/TCanSeeInSameRoom.class.php +++ b/files/lib/system/message/type/TCanSeeInSameRoom.class.php @@ -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, diff --git a/files/lib/system/message/type/TeamMessageType.class.php b/files/lib/system/message/type/TeamMessageType.class.php index fe8045b..9005956 100644 --- a/files/lib/system/message/type/TeamMessageType.class.php +++ b/files/lib/system/message/type/TeamMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/TemproomCreatedMessageType.class.php b/files/lib/system/message/type/TemproomCreatedMessageType.class.php index 08f9935..a441873 100644 --- a/files/lib/system/message/type/TemproomCreatedMessageType.class.php +++ b/files/lib/system/message/type/TemproomCreatedMessageType.class.php @@ -26,7 +26,7 @@ final class TemproomCreatedMessageType implements IMessageType /** * @inheritDoc */ - public function getJavaScriptModuleName() + public function getJavaScriptModuleName(): string { return 'Bastelstu.be/Chat/MessageType/TemproomCreated'; } diff --git a/files/lib/system/message/type/TemproomInvitedMessageType.class.php b/files/lib/system/message/type/TemproomInvitedMessageType.class.php index 2e0298c..771eb76 100644 --- a/files/lib/system/message/type/TemproomInvitedMessageType.class.php +++ b/files/lib/system/message/type/TemproomInvitedMessageType.class.php @@ -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, diff --git a/files/lib/system/message/type/TombstoneMessageType.class.php b/files/lib/system/message/type/TombstoneMessageType.class.php index 6aa2fe0..6ffd71e 100644 --- a/files/lib/system/message/type/TombstoneMessageType.class.php +++ b/files/lib/system/message/type/TombstoneMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/UnsuspendMessageType.class.php b/files/lib/system/message/type/UnsuspendMessageType.class.php index 966cb8d..f97ab95 100644 --- a/files/lib/system/message/type/UnsuspendMessageType.class.php +++ b/files/lib/system/message/type/UnsuspendMessageType.class.php @@ -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; } diff --git a/files/lib/system/message/type/WhereMessageType.class.php b/files/lib/system/message/type/WhereMessageType.class.php index b7e2cbf..0db80e0 100644 --- a/files/lib/system/message/type/WhereMessageType.class.php +++ b/files/lib/system/message/type/WhereMessageType.class.php @@ -31,7 +31,7 @@ final class WhereMessageType implements IMessageType /** * @inheritDoc */ - public function getJavaScriptModuleName() + public function getJavaScriptModuleName(): string { return 'Bastelstu.be/Chat/MessageType/Where'; } diff --git a/files/lib/system/message/type/WhisperMessageType.class.php b/files/lib/system/message/type/WhisperMessageType.class.php index a931a0e..b4ef97c 100644 --- a/files/lib/system/message/type/WhisperMessageType.class.php +++ b/files/lib/system/message/type/WhisperMessageType.class.php @@ -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,