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

Add proper return types to MessageAttachmentObjectType

This commit is contained in:
Tim Düsterhus 2022-03-04 19:49:05 +01:00
parent d07298f086
commit e516caecbf
Signed by: TimWolla
GPG Key ID: 8FF75566094168AF

View File

@ -30,7 +30,7 @@ final class MessageAttachmentObjectType extends AbstractAttachmentObjectType
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function canDownload($objectID) public function canDownload($objectID): bool
{ {
if ($objectID) { if ($objectID) {
$message = new Message($objectID); $message = new Message($objectID);
@ -47,7 +47,7 @@ public function canDownload($objectID)
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function canUpload($objectID, $parentObjectID = 0) public function canUpload($objectID, $parentObjectID = 0): bool
{ {
if ($objectID) { if ($objectID) {
return false; return false;
@ -72,7 +72,7 @@ public function canUpload($objectID, $parentObjectID = 0)
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function canDelete($objectID) public function canDelete($objectID): bool
{ {
return false; return false;
} }
@ -80,7 +80,7 @@ public function canDelete($objectID)
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function getMaxCount() public function getMaxCount(): int
{ {
return 1; return 1;
} }
@ -88,9 +88,9 @@ public function getMaxCount()
/** /**
* @inheritDoc * @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');
} }
/** /**