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
*/
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');
}
/**