From baa4ae83ee87a35064c7466d41128aa86b0a7b20 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 12 May 2021 12:25:37 +0200 Subject: [PATCH] Use/Add explicit `return null;` statement --- .../data/conversation/message/ConversationMessage.class.php | 2 +- .../clipboard/action/ConversationClipboardAction.class.php | 6 +++--- files/lib/system/search/ConversationMessageSearch.class.php | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) 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; } /** -- 2.20.1