From e516caecbf495a7ff2bae337742b823b45403f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 4 Mar 2022 19:49:05 +0100 Subject: [PATCH] Add proper return types to MessageAttachmentObjectType --- .../attachment/MessageAttachmentObjectType.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/files/lib/system/attachment/MessageAttachmentObjectType.class.php b/files/lib/system/attachment/MessageAttachmentObjectType.class.php index bb3da60..3c80e61 100644 --- a/files/lib/system/attachment/MessageAttachmentObjectType.class.php +++ b/files/lib/system/attachment/MessageAttachmentObjectType.class.php @@ -30,7 +30,7 @@ final class MessageAttachmentObjectType extends AbstractAttachmentObjectType /** * @inheritDoc */ - public function canDownload($objectID) + public function canDownload($objectID): bool { if ($objectID) { $message = new Message($objectID); @@ -47,7 +47,7 @@ public function canDownload($objectID) /** * @inheritDoc */ - public function canUpload($objectID, $parentObjectID = 0) + public function canUpload($objectID, $parentObjectID = 0): bool { if ($objectID) { return false; @@ -72,7 +72,7 @@ public function canUpload($objectID, $parentObjectID = 0) /** * @inheritDoc */ - public function canDelete($objectID) + public function canDelete($objectID): bool { return false; } @@ -80,7 +80,7 @@ public function canDelete($objectID) /** * @inheritDoc */ - public function getMaxCount() + public function getMaxCount(): int { return 1; } @@ -88,9 +88,9 @@ public function getMaxCount() /** * @inheritDoc */ - public function getMaxSize() + public function getMaxSize(): int { - return WCF::getSession()->getPermission('user.chat.attachment.maxSize'); + return (int)WCF::getSession()->getPermission('user.chat.attachment.maxSize'); } /**