diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-10-09 11:21:03 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-10-09 11:30:55 +0300 |
commit | 0a1e1ad8bc46bb4d4b0846b840cd6b8a4ff3c408 (patch) | |
tree | ca6e6906eeaa390bd334152d9c4915c7b3bd4701 /lib/Model | |
parent | 374e9fbbae219635168b3fab0a53a1c056db7ab4 (diff) |
Fix more type and nullable errors
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/IMAPMessage.php | 8 | ||||
-rw-r--r-- | lib/Model/IMessage.php | 2 | ||||
-rw-r--r-- | lib/Model/NewMessageData.php | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/Model/IMAPMessage.php b/lib/Model/IMAPMessage.php index c403b1322..7069ff825 100644 --- a/lib/Model/IMAPMessage.php +++ b/lib/Model/IMAPMessage.php @@ -145,7 +145,7 @@ class IMAPMessage implements IMessage, JsonSerializable { } /** - * @param array $flags + * @param string[] $flags * * @throws Exception * @@ -331,7 +331,7 @@ class IMAPMessage implements IMessage, JsonSerializable { // $list is an array of Horde_Imap_Client_Data_Fetch objects. $ids = new Horde_Imap_Client_Ids($this->messageId); $headers = $this->conn->fetch($this->mailBox, $fetch_query, ['ids' => $ids]); - /** @var $fetch \Horde_Imap_Client_Data_Fetch */ + /** @var Horde_Imap_Client_Data_Fetch $fetch */ $fetch = $headers[$this->messageId]; if (is_null($fetch)) { throw new DoesNotExistException("This email ($this->messageId) can't be found. Probably it was deleted from the server recently. Please reload."); @@ -596,7 +596,7 @@ class IMAPMessage implements IMessage, JsonSerializable { } /** - * @return int[] + * @return Horde_Mime_Part[] */ public function getLocalAttachments(): array { throw new Exception('not implemented'); @@ -622,7 +622,7 @@ class IMAPMessage implements IMessage, JsonSerializable { } /** - * @return IMessage|null + * @return string|null */ public function getInReplyTo() { throw new Exception('not implemented'); diff --git a/lib/Model/IMessage.php b/lib/Model/IMessage.php index 971b3c596..dbdc2426b 100644 --- a/lib/Model/IMessage.php +++ b/lib/Model/IMessage.php @@ -46,7 +46,7 @@ interface IMessage { public function getFlags(): array; /** - * @param array $flags + * @param string[] $flags */ public function setFlags(array $flags); diff --git a/lib/Model/NewMessageData.php b/lib/Model/NewMessageData.php index f578e049d..acad7db3f 100644 --- a/lib/Model/NewMessageData.php +++ b/lib/Model/NewMessageData.php @@ -105,9 +105,8 @@ class NewMessageData { $toList = AddressList::parse($to ?: ''); $ccList = AddressList::parse($cc ?: ''); $bccList = AddressList::parse($bcc ?: ''); - $attachmentsArray = $attachments === null ? [] : $attachments; - return new self($account, $toList, $ccList, $bccList, $subject, $body, $attachmentsArray, $isHtml); + return new self($account, $toList, $ccList, $bccList, $subject, $body, $attachments, $isHtml); } /** |