Skip to content

Commit 4a0fcad

Browse files
committed
docs: Annotate shape for inlineAttachments
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 parent b9002e8 commit 4a0fcad

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

lib/IMAP/ImapMessageFetcher.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ class ImapMessageFetcher {
5151
private string $htmlMessage = '';
5252
private string $plainMessage = '';
5353
private array $attachments = [];
54+
/**
55+
* @var array{
56+
* id: string|null,
57+
* messageId: int,
58+
* fileName: string,
59+
* mime: string,
60+
* size: int,
61+
* cid: string|null
62+
* }
63+
*/
5464
private array $inlineAttachments = [];
5565
private bool $hasAnyAttachment = false;
5666
private array $scheduling = [];

lib/Model/IMAPMessage.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ class IMAPMessage implements IMessage, JsonSerializable {
7171
private bool $signatureIsValid;
7272
private bool $isPgpMimeEncrypted;
7373

74+
/**
75+
* @param array{
76+
* id: string|null,
77+
* messageId: int,
78+
* fileName: string,
79+
* mime: string,
80+
* size: int,
81+
* cid: string|null
82+
* } $inlineAttachments
83+
*/
7484
public function __construct(int $uid,
7585
string $messageId,
7686
array $flags,

lib/Service/Html.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ private function addAttachmentUrl(int $messageId, array $inlineAttachments): arr
118118
}, $inlineAttachments);
119119
}
120120

121+
/**
122+
* @param array{
123+
* id: string|null,
124+
* messageId: int,
125+
* fileName: string,
126+
* mime: string,
127+
* size: int,
128+
* cid: string|null
129+
* } $inlineAttachments
130+
*/
121131
public function sanitizeHtmlMailBody(int $messageId, string $mailBody, array $inlineAttachments): string {
122132
$inlineAttachments = $this->addAttachmentUrl($messageId, $inlineAttachments);
123133

0 commit comments

Comments
 (0)