git subrepo commit (merge) mailcow/src/mailcow-dockerized

subrepo: subdir:   "mailcow/src/mailcow-dockerized"
  merged:   "02ae5285"
upstream: origin:   "https://github.com/mailcow/mailcow-dockerized.git"
  branch:   "master"
  commit:   "649a5c01"
git-subrepo: version:  "0.4.3"
  origin:   "???"
  commit:   "???"
Change-Id: I870ad468fba026cc5abf3c5699ed1e12ff28b32b
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractMessage.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractMessage.php
index 5d67e90..0f022cc 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractMessage.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractMessage.php
@@ -9,9 +9,9 @@
 abstract class AbstractMessage extends AbstractPart
 {
     /**
-     * @var null|array
+     * @var null|Attachment[]
      */
-    private $attachments;
+    private ?array $attachments = null;
 
     /**
      * Get message headers.
@@ -25,7 +25,10 @@
      */
     final public function getId(): ?string
     {
-        return $this->getHeaders()->get('message_id');
+        $messageId = $this->getHeaders()->get('message_id');
+        \assert(null === $messageId || \is_string($messageId));
+
+        return $messageId;
     }
 
     /**
@@ -34,6 +37,7 @@
     final public function getFrom(): ?EmailAddress
     {
         $from = $this->getHeaders()->get('from');
+        \assert(null === $from || \is_array($from));
 
         return null !== $from ? $this->decodeEmailAddress($from[0]) : null;
     }
@@ -45,7 +49,10 @@
      */
     final public function getTo(): array
     {
-        return $this->decodeEmailAddresses($this->getHeaders()->get('to') ?: []);
+        $emails = $this->getHeaders()->get('to');
+        \assert(null === $emails || \is_array($emails));
+
+        return $this->decodeEmailAddresses($emails ?? []);
     }
 
     /**
@@ -55,7 +62,10 @@
      */
     final public function getCc(): array
     {
-        return $this->decodeEmailAddresses($this->getHeaders()->get('cc') ?: []);
+        $emails = $this->getHeaders()->get('cc');
+        \assert(null === $emails || \is_array($emails));
+
+        return $this->decodeEmailAddresses($emails ?? []);
     }
 
     /**
@@ -65,7 +75,10 @@
      */
     final public function getBcc(): array
     {
-        return $this->decodeEmailAddresses($this->getHeaders()->get('bcc') ?: []);
+        $emails = $this->getHeaders()->get('bcc');
+        \assert(null === $emails || \is_array($emails));
+
+        return $this->decodeEmailAddresses($emails ?? []);
     }
 
     /**
@@ -75,7 +88,10 @@
      */
     final public function getReplyTo(): array
     {
-        return $this->decodeEmailAddresses($this->getHeaders()->get('reply_to') ?: []);
+        $emails = $this->getHeaders()->get('reply_to');
+        \assert(null === $emails || \is_array($emails));
+
+        return $this->decodeEmailAddresses($emails ?? []);
     }
 
     /**
@@ -85,7 +101,10 @@
      */
     final public function getSender(): array
     {
-        return $this->decodeEmailAddresses($this->getHeaders()->get('sender') ?: []);
+        $emails = $this->getHeaders()->get('sender');
+        \assert(null === $emails || \is_array($emails));
+
+        return $this->decodeEmailAddresses($emails ?? []);
     }
 
     /**
@@ -95,7 +114,10 @@
      */
     final public function getReturnPath(): array
     {
-        return $this->decodeEmailAddresses($this->getHeaders()->get('return_path') ?: []);
+        $emails = $this->getHeaders()->get('return_path');
+        \assert(null === $emails || \is_array($emails));
+
+        return $this->decodeEmailAddresses($emails ?? []);
     }
 
     /**
@@ -137,7 +159,10 @@
      */
     final public function getSize()
     {
-        return $this->getHeaders()->get('size');
+        $size = $this->getHeaders()->get('size');
+        \assert(null === $size || \is_int($size) || \is_string($size));
+
+        return $size;
     }
 
     /**
@@ -145,25 +170,34 @@
      */
     final public function getSubject(): ?string
     {
-        return $this->getHeaders()->get('subject');
+        $subject = $this->getHeaders()->get('subject');
+        \assert(null === $subject || \is_string($subject));
+
+        return $subject;
     }
 
     /**
      * Get message In-Reply-To (from headers).
+     *
+     * @return string[]
      */
     final public function getInReplyTo(): array
     {
         $inReplyTo = $this->getHeaders()->get('in_reply_to');
+        \assert(null === $inReplyTo || \is_string($inReplyTo));
 
         return null !== $inReplyTo ? \explode(' ', $inReplyTo) : [];
     }
 
     /**
      * Get message References (from headers).
+     *
+     * @return string[]
      */
     final public function getReferences(): array
     {
         $references = $this->getHeaders()->get('references');
+        \assert(null === $references || \is_string($references));
 
         return null !== $references ? \explode(' ', $references) : [];
     }
@@ -222,6 +256,11 @@
         return $this->attachments;
     }
 
+    /**
+     * @param PartInterface<PartInterface> $part
+     *
+     * @return Attachment[]
+     */
     private static function gatherAttachments(PartInterface $part): array
     {
         $attachments = [];
@@ -247,6 +286,8 @@
 
     /**
      * @param \stdClass[] $addresses
+     *
+     * @return EmailAddress[]
      */
     private function decodeEmailAddresses(array $addresses): array
     {
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php
index ab13eb0..0ab0ca5 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php
@@ -14,95 +14,7 @@
  */
 abstract class AbstractPart implements PartInterface
 {
-    /**
-     * @var ImapResourceInterface
-     */
-    protected $resource;
-
-    /**
-     * @var bool
-     */
-    private $structureParsed = false;
-
-    /**
-     * @var array
-     */
-    private $parts = [];
-
-    /**
-     * @var string
-     */
-    private $partNumber;
-
-    /**
-     * @var int
-     */
-    private $messageNumber;
-
-    /**
-     * @var \stdClass
-     */
-    private $structure;
-
-    /**
-     * @var Parameters
-     */
-    private $parameters;
-
-    /**
-     * @var null|string
-     */
-    private $type;
-
-    /**
-     * @var null|string
-     */
-    private $subtype;
-
-    /**
-     * @var null|string
-     */
-    private $encoding;
-
-    /**
-     * @var null|string
-     */
-    private $disposition;
-
-    /**
-     * @var null|string
-     */
-    private $description;
-
-    /**
-     * @var null|string
-     */
-    private $bytes;
-
-    /**
-     * @var null|string
-     */
-    private $lines;
-
-    /**
-     * @var null|string
-     */
-    private $content;
-
-    /**
-     * @var null|string
-     */
-    private $decodedContent;
-
-    /**
-     * @var int
-     */
-    private $key = 0;
-
-    /**
-     * @var array
-     */
-    private static $typesMap = [
+    private const TYPES_MAP = [
         \TYPETEXT        => self::TYPE_TEXT,
         \TYPEMULTIPART   => self::TYPE_MULTIPART,
         \TYPEMESSAGE     => self::TYPE_MESSAGE,
@@ -114,10 +26,7 @@
         \TYPEOTHER       => self::TYPE_OTHER,
     ];
 
-    /**
-     * @var array
-     */
-    private static $encodingsMap = [
+    private const ENCODINGS_MAP = [
         \ENC7BIT            => self::ENCODING_7BIT,
         \ENC8BIT            => self::ENCODING_8BIT,
         \ENCBINARY          => self::ENCODING_BINARY,
@@ -125,16 +34,35 @@
         \ENCQUOTEDPRINTABLE => self::ENCODING_QUOTED_PRINTABLE,
     ];
 
-    /**
-     * @var array
-     */
-    private static $attachmentKeys = [
+    private const ATTACHMENT_KEYS = [
         'name'      => true,
         'filename'  => true,
         'name*'     => true,
         'filename*' => true,
     ];
 
+    protected ImapResourceInterface $resource;
+    private bool $structureParsed = false;
+    /**
+     * @var AbstractPart[]
+     */
+    private array $parts = [];
+    private string $partNumber;
+    private int $messageNumber;
+    private \stdClass $structure;
+    private Parameters $parameters;
+    private ?string $type        = null;
+    private ?string $subtype     = null;
+    private ?string $encoding    = null;
+    private ?string $disposition = null;
+    private ?string $description = null;
+    /** @var null|int|string */
+    private $bytes;
+    private ?string $lines          = null;
+    private ?string $content        = null;
+    private ?string $decodedContent = null;
+    private int $key                = 0;
+
     /**
      * Constructor.
      *
@@ -155,9 +83,6 @@
         $this->setStructure($structure);
     }
 
-    /**
-     * Get message number (from headers).
-     */
     final public function getNumber(): int
     {
         $this->assertMessageExists($this->messageNumber);
@@ -180,9 +105,6 @@
         $this->structure = $structure;
     }
 
-    /**
-     * Part structure.
-     */
     final public function getStructure(): \stdClass
     {
         $this->lazyLoadStructure();
@@ -197,9 +119,6 @@
     {
     }
 
-    /**
-     * Part parameters.
-     */
     final public function getParameters(): Parameters
     {
         $this->lazyParseStructure();
@@ -207,19 +126,16 @@
         return $this->parameters;
     }
 
-    /**
-     * Part charset.
-     */
     final public function getCharset(): ?string
     {
         $this->lazyParseStructure();
 
-        return $this->parameters->get('charset') ?: null;
+        $charset = $this->parameters->get('charset');
+        \assert(null === $charset || \is_string($charset));
+
+        return '' !== $charset ? $charset : null;
     }
 
-    /**
-     * Part type.
-     */
     final public function getType(): ?string
     {
         $this->lazyParseStructure();
@@ -227,9 +143,6 @@
         return $this->type;
     }
 
-    /**
-     * Part subtype.
-     */
     final public function getSubtype(): ?string
     {
         $this->lazyParseStructure();
@@ -237,9 +150,6 @@
         return $this->subtype;
     }
 
-    /**
-     * Part encoding.
-     */
     final public function getEncoding(): ?string
     {
         $this->lazyParseStructure();
@@ -247,9 +157,6 @@
         return $this->encoding;
     }
 
-    /**
-     * Part disposition.
-     */
     final public function getDisposition(): ?string
     {
         $this->lazyParseStructure();
@@ -257,9 +164,6 @@
         return $this->disposition;
     }
 
-    /**
-     * Part description.
-     */
     final public function getDescription(): ?string
     {
         $this->lazyParseStructure();
@@ -267,11 +171,6 @@
         return $this->description;
     }
 
-    /**
-     * Part bytes.
-     *
-     * @return null|int|string
-     */
     final public function getBytes()
     {
         $this->lazyParseStructure();
@@ -279,9 +178,6 @@
         return $this->bytes;
     }
 
-    /**
-     * Part lines.
-     */
     final public function getLines(): ?string
     {
         $this->lazyParseStructure();
@@ -289,9 +185,6 @@
         return $this->lines;
     }
 
-    /**
-     * Get raw part content.
-     */
     final public function getContent(): string
     {
         if (null === $this->content) {
@@ -309,17 +202,11 @@
         return $this->partNumber;
     }
 
-    /**
-     * Get part number.
-     */
     final public function getPartNumber(): string
     {
         return $this->partNumber;
     }
 
-    /**
-     * Get decoded part content.
-     */
     final public function getDecodedContent(): string
     {
         if (null === $this->decodedContent) {
@@ -369,11 +256,6 @@
         return $return;
     }
 
-    /**
-     * Get an array of all parts for this message.
-     *
-     * @return PartInterface[]
-     */
     final public function getParts(): array
     {
         $this->lazyParseStructure();
@@ -393,21 +275,11 @@
         return $this->parts[$this->key];
     }
 
-    /**
-     * Get current child part.
-     *
-     * @return \RecursiveIterator
-     */
     final public function getChildren()
     {
         return $this->current();
     }
 
-    /**
-     * Get current child part.
-     *
-     * @return bool
-     */
     final public function hasChildren()
     {
         $this->lazyParseStructure();
@@ -416,8 +288,6 @@
     }
 
     /**
-     * Get current part key.
-     *
      * @return int
      */
     final public function key()
@@ -425,31 +295,16 @@
         return $this->key;
     }
 
-    /**
-     * Move to next part.
-     *
-     * @return void
-     */
     final public function next()
     {
         ++$this->key;
     }
 
-    /**
-     * Reset part key.
-     *
-     * @return void
-     */
     final public function rewind()
     {
         $this->key = 0;
     }
 
-    /**
-     * Check if current part is a valid one.
-     *
-     * @return bool
-     */
     final public function valid()
     {
         $this->lazyParseStructure();
@@ -469,10 +324,10 @@
 
         $this->lazyLoadStructure();
 
-        $this->type = self::$typesMap[$this->structure->type] ?? self::TYPE_UNKNOWN;
+        $this->type = self::TYPES_MAP[$this->structure->type] ?? self::TYPE_UNKNOWN;
 
         // In our context, \ENCOTHER is as useful as an unknown encoding
-        $this->encoding = self::$encodingsMap[$this->structure->encoding] ?? self::ENCODING_UNKNOWN;
+        $this->encoding = self::ENCODINGS_MAP[$this->structure->encoding] ?? self::ENCODING_UNKNOWN;
         if (isset($this->structure->subtype)) {
             $this->subtype = $this->structure->subtype;
         }
@@ -527,7 +382,7 @@
      */
     private static function isAttachment(\stdClass $part): bool
     {
-        if (isset(self::$typesMap[$part->type]) && self::TYPE_MULTIPART === self::$typesMap[$part->type]) {
+        if (isset(self::TYPES_MAP[$part->type]) && self::TYPE_MULTIPART === self::TYPES_MAP[$part->type]) {
             return false;
         }
 
@@ -549,7 +404,7 @@
         // Attachment without Content-Disposition header
         if ($part->ifparameters) {
             foreach ($part->parameters as $parameter) {
-                if (isset(self::$attachmentKeys[\strtolower($parameter->attribute)])) {
+                if (isset(self::ATTACHMENT_KEYS[\strtolower($parameter->attribute)])) {
                     return true;
                 }
             }
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Attachment.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Attachment.php
index bd76769..b134b8d 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Attachment.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Attachment.php
@@ -11,43 +11,33 @@
  */
 final class Attachment extends AbstractPart implements AttachmentInterface
 {
-    /**
-     * Get attachment filename.
-     */
     public function getFilename(): ?string
     {
-        return $this->getParameters()->get('filename')
-            ?: $this->getParameters()->get('name');
+        $filename = $this->getParameters()->get('filename');
+        if (null === $filename || '' === $filename) {
+            $filename = $this->getParameters()->get('name');
+        }
+        \assert(null === $filename || \is_string($filename));
+
+        return $filename;
     }
 
-    /**
-     * Get attachment file size.
-     *
-     * @return null|int Number of bytes
-     */
     public function getSize()
     {
         $size = $this->getParameters()->get('size');
         if (\is_numeric($size)) {
             $size = (int) $size;
         }
+        \assert(null === $size || \is_int($size));
 
         return $size;
     }
 
-    /**
-     * Is this attachment also an Embedded Message?
-     */
     public function isEmbeddedMessage(): bool
     {
         return self::TYPE_MESSAGE === $this->getType();
     }
 
-    /**
-     * Return embedded message.
-     *
-     * @throws NotEmbeddedMessageException
-     */
     public function getEmbeddedMessage(): EmbeddedMessageInterface
     {
         if (!$this->isEmbeddedMessage()) {
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AttachmentInterface.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AttachmentInterface.php
index 0d20f44..286e188 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AttachmentInterface.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AttachmentInterface.php
@@ -4,6 +4,8 @@
 
 namespace Ddeboer\Imap\Message;
 
+use Ddeboer\Imap\Exception\NotEmbeddedMessageException;
+
 /**
  * An e-mail attachment.
  */
@@ -28,6 +30,10 @@
 
     /**
      * Return embedded message.
+     *
+     * @throws NotEmbeddedMessageException
+     *
+     * @return EmbeddedMessageInterface<PartInterface>
      */
     public function getEmbeddedMessage(): EmbeddedMessageInterface;
 }
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/BasicMessageInterface.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/BasicMessageInterface.php
index 20e6b1a..83dbd17 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/BasicMessageInterface.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/BasicMessageInterface.php
@@ -96,11 +96,15 @@
 
     /**
      * Get message In-Reply-To (from headers).
+     *
+     * @return string[]
      */
     public function getInReplyTo(): array;
 
     /**
      * Get message References (from headers).
+     *
+     * @return string[]
      */
     public function getReferences(): array;
 
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php
index b88e0f9..9f60fb1 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php
@@ -9,25 +9,10 @@
  */
 final class EmailAddress
 {
-    /**
-     * @var string
-     */
-    private $mailbox;
-
-    /**
-     * @var null|string
-     */
-    private $hostname;
-
-    /**
-     * @var null|string
-     */
-    private $name;
-
-    /**
-     * @var null|string
-     */
-    private $address;
+    private string $mailbox;
+    private ?string $hostname;
+    private ?string $name;
+    private ?string $address;
 
     public function __construct(string $mailbox, string $hostname = null, string $name = null)
     {
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessage.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessage.php
index 243cff6..20d9715 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessage.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessage.php
@@ -6,24 +6,10 @@
 
 final class EmbeddedMessage extends AbstractMessage implements EmbeddedMessageInterface
 {
-    /**
-     * @var null|Headers
-     */
-    private $headers;
+    private ?Headers $headers   = null;
+    private ?string $rawHeaders = null;
+    private ?string $rawMessage = null;
 
-    /**
-     * @var null|string
-     */
-    private $rawHeaders;
-
-    /**
-     * @var null|string
-     */
-    private $rawMessage;
-
-    /**
-     * Get message headers.
-     */
     public function getHeaders(): Headers
     {
         if (null === $this->headers) {
@@ -33,9 +19,6 @@
         return $this->headers;
     }
 
-    /**
-     * Get raw message headers.
-     */
     public function getRawHeaders(): string
     {
         if (null === $this->rawHeaders) {
@@ -46,11 +29,6 @@
         return $this->rawHeaders;
     }
 
-    /**
-     * Get the raw message, including all headers, parts, etc. unencoded and unparsed.
-     *
-     * @return string the raw message
-     */
     public function getRawMessage(): string
     {
         if (null === $this->rawMessage) {
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Headers.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Headers.php
index f76fec3..0dc6352 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Headers.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Headers.php
@@ -4,14 +4,8 @@
 
 namespace Ddeboer\Imap\Message;
 
-/**
- * Collection of message headers.
- */
 final class Headers extends Parameters
 {
-    /**
-     * Constructor.
-     */
     public function __construct(\stdClass $headers)
     {
         parent::__construct();
@@ -27,7 +21,7 @@
     /**
      * Get header.
      *
-     * @return mixed
+     * @return null|int|\stdClass[]|string
      */
     public function get(string $key)
     {
@@ -37,14 +31,16 @@
     /**
      * Parse header.
      *
-     * @param mixed $value
+     * @param int|\stdClass[]|string $value
      *
-     * @return mixed
+     * @return int|\stdClass[]|string
      */
     private function parseHeader(string $key, $value)
     {
         switch ($key) {
             case 'msgno':
+                \assert(\is_string($value));
+
                 return (int) $value;
             case 'from':
             case 'to':
@@ -53,6 +49,7 @@
             case 'reply_to':
             case 'sender':
             case 'return_path':
+                \assert(\is_array($value));
                 /** @var \stdClass $address */
                 foreach ($value as $address) {
                     if (isset($address->mailbox)) {
@@ -64,6 +61,8 @@
                 return $value;
             case 'date':
             case 'subject':
+                \assert(\is_string($value));
+
                 return $this->decode($value);
         }
 
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Parameters.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Parameters.php
index 2f7d8a1..37ed816 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Parameters.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Parameters.php
@@ -4,23 +4,22 @@
 
 namespace Ddeboer\Imap\Message;
 
+/**
+ * @extends \ArrayIterator<int|string, int|string|\stdClass[]>
+ */
 class Parameters extends \ArrayIterator
 {
     /**
-     * @var array
+     * @var array<string, string>
      */
-    private static $attachmentCustomKeys = [
+    private static array $attachmentCustomKeys = [
         'name*'     => 'name',
         'filename*' => 'filename',
     ];
 
-    public function __construct(array $parameters = [])
-    {
-        parent::__construct();
-
-        $this->add($parameters);
-    }
-
+    /**
+     * @param \stdClass[] $parameters
+     */
     public function add(array $parameters = []): void
     {
         foreach ($parameters as $parameter) {
@@ -34,16 +33,13 @@
     }
 
     /**
-     * @return mixed
+     * @return null|int|\stdClass[]|string
      */
     public function get(string $key)
     {
         return $this[$key] ?? null;
     }
 
-    /**
-     * Decode value.
-     */
     final protected function decode(string $value): string
     {
         $parts = \imap_mime_header_decode($value);
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Transcoder.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Transcoder.php
index ee02a15..bd439e0 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Transcoder.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Transcoder.php
@@ -9,14 +9,12 @@
 final class Transcoder
 {
     /**
-     * @var array
-     *
      * @see https://encoding.spec.whatwg.org/#encodings
      * @see https://dxr.mozilla.org/mozilla-central/source/dom/encoding/labelsencodings.properties
      * @see https://dxr.mozilla.org/mozilla1.9.1/source/intl/uconv/src/charsetalias.properties
      * @see https://msdn.microsoft.com/en-us/library/cc194829.aspx
      */
-    private static $charsetAliases = [
+    private const CHARSET_ALIASES = [
         '128'                       => 'Shift_JIS',
         '129'                       => 'EUC-KR',
         '134'                       => 'GB2312',
@@ -252,6 +250,7 @@
         'x-iso-10646-ucs-2-le'      => 'UTF-16LE',
         'x-iso-10646-ucs-4-be'      => 'UTF-32BE',
         'x-iso-10646-ucs-4-le'      => 'UTF-32LE',
+        'x-mac-ce'                  => 'windows-1250',
         'x-sjis'                    => 'Shift_JIS',
         'x-unicode-2-0-utf-7'       => 'UTF-7',
         'x-x-big5'                  => 'Big5',
@@ -282,8 +281,8 @@
 
         $originalFromCharset  = $fromCharset;
         $lowercaseFromCharset = \strtolower($fromCharset);
-        if (isset(self::$charsetAliases[$lowercaseFromCharset])) {
-            $fromCharset = self::$charsetAliases[$lowercaseFromCharset];
+        if (isset(self::CHARSET_ALIASES[$lowercaseFromCharset])) {
+            $fromCharset = self::CHARSET_ALIASES[$lowercaseFromCharset];
         }
 
         \set_error_handler(static function (): bool {