From: Matthias Schmidt Date: Wed, 12 May 2021 10:25:37 +0000 (+0200) Subject: Use/Add explicit `return null;` statement X-Git-Tag: 5.4.0_Alpha_3~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=baa4ae83ee87a35064c7466d41128aa86b0a7b20;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Use/Add explicit `return null;` statement --- diff --git a/files/lib/data/conversation/message/ConversationMessage.class.php b/files/lib/data/conversation/message/ConversationMessage.class.php index 4746e28..548ae64 100644 --- a/files/lib/data/conversation/message/ConversationMessage.class.php +++ b/files/lib/data/conversation/message/ConversationMessage.class.php @@ -86,7 +86,7 @@ class ConversationMessage extends DatabaseObject implements IMessage ]); if ($ignoreCache && !\count($attachmentList)) { - return; + return null; } return $attachmentList; diff --git a/files/lib/system/clipboard/action/ConversationClipboardAction.class.php b/files/lib/system/clipboard/action/ConversationClipboardAction.class.php index d1d1ca7..e802bab 100644 --- a/files/lib/system/clipboard/action/ConversationClipboardAction.class.php +++ b/files/lib/system/clipboard/action/ConversationClipboardAction.class.php @@ -54,13 +54,13 @@ class ConversationClipboardAction extends AbstractClipboardAction // check if no conversation was accessible if (empty($this->conversations)) { - return; + return null; } $item = parent::execute($objects, $action); if ($item === null) { - return; + return null; } switch ($action->actionName) { @@ -73,7 +73,7 @@ class ConversationClipboardAction extends AbstractClipboardAction $statement->execute([WCF::getUser()->userID]); $row = $statement->fetchArray(); if ($row['count'] == 0) { - return; + return null; } $item->addParameter('objectIDs', \array_keys($this->conversations)); diff --git a/files/lib/system/search/ConversationMessageSearch.class.php b/files/lib/system/search/ConversationMessageSearch.class.php index f8bcaef..67d3977 100644 --- a/files/lib/system/search/ConversationMessageSearch.class.php +++ b/files/lib/system/search/ConversationMessageSearch.class.php @@ -145,6 +145,8 @@ class ConversationMessageSearch extends AbstractSearchableObjectType if ($this->conversation) { return 'searchConversationMessage'; } + + return null; } /**