From 2c84cf76c1c7b97d43bca482241738be93c6df65 Mon Sep 17 00:00:00 2001 From: homersimpsons Date: Tue, 28 Jul 2020 15:40:31 +0200 Subject: [PATCH 1/3] MailboxIterface: Typehint to interface instead of implementation Prefer `MessageIteratorInterface` instead of `MessageIterator`. This should not be a breaking change as `MessageIterator implements MessageIteratorInterface` --- src/MailboxInterface.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MailboxInterface.php b/src/MailboxInterface.php index efe432da..5f211114 100644 --- a/src/MailboxInterface.php +++ b/src/MailboxInterface.php @@ -45,16 +45,16 @@ public function getStatus(int $flags = null): \stdClass; /** * Bulk Set Flag for Messages. * - * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft - * @param array|MessageIterator|string $numbers Message numbers + * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft + * @param array|MessageIteratorInterface|string $numbers Message numbers */ public function setFlag(string $flag, $numbers): bool; /** * Bulk Clear Flag for Messages. * - * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft - * @param array|MessageIterator|string $numbers Message numbers + * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft + * @param array|MessageIteratorInterface|string $numbers Message numbers */ public function clearFlag(string $flag, $numbers): bool; @@ -97,8 +97,8 @@ public function getThread(): array; /** * Bulk move messages. * - * @param array|MessageIterator|string $numbers Message numbers - * @param MailboxInterface $mailbox Destination Mailbox to move the messages to + * @param array|MessageIteratorInterface|string $numbers Message numbers + * @param MailboxInterface $mailbox Destination Mailbox to move the messages to * * @throws \Ddeboer\Imap\Exception\MessageMoveException */ @@ -107,8 +107,8 @@ public function move($numbers, self $mailbox): void; /** * Bulk copy messages. * - * @param array|MessageIterator|string $numbers Message numbers - * @param MailboxInterface $mailbox Destination Mailbox to copy the messages to + * @param array|MessageIteratorInterface|string $numbers Message numbers + * @param MailboxInterface $mailbox Destination Mailbox to copy the messages to * * @throws \Ddeboer\Imap\Exception\MessageCopyException */ From 248079593e6a4e74ac8959592ad9b9cbfa2f9beb Mon Sep 17 00:00:00 2001 From: homersimpsons Date: Tue, 28 Jul 2020 15:42:09 +0200 Subject: [PATCH 2/3] MailboxInterface: fix codestyle --- src/MailboxInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MailboxInterface.php b/src/MailboxInterface.php index 5f211114..80c32935 100644 --- a/src/MailboxInterface.php +++ b/src/MailboxInterface.php @@ -108,7 +108,7 @@ public function move($numbers, self $mailbox): void; * Bulk copy messages. * * @param array|MessageIteratorInterface|string $numbers Message numbers - * @param MailboxInterface $mailbox Destination Mailbox to copy the messages to + * @param MailboxInterface $mailbox Destination Mailbox to copy the messages to * * @throws \Ddeboer\Imap\Exception\MessageCopyException */ From 8eaf38d55121bcfd3346dd87ab7bed0a58a20200 Mon Sep 17 00:00:00 2001 From: homersimpsons Date: Tue, 28 Jul 2020 16:02:35 +0200 Subject: [PATCH 3/3] Mailbox: MessageIteratorInterface over MessageIterator Reflect changes to MailboxInterface --- src/Mailbox.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Mailbox.php b/src/Mailbox.php index f57e79bf..179c9ed8 100644 --- a/src/Mailbox.php +++ b/src/Mailbox.php @@ -123,8 +123,8 @@ public function getStatus(int $flags = null): \stdClass /** * Bulk Set Flag for Messages. * - * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft - * @param array|MessageIterator|string $numbers Message numbers + * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft + * @param array|MessageIteratorInterface|string $numbers Message numbers */ public function setFlag(string $flag, $numbers): bool { @@ -134,8 +134,8 @@ public function setFlag(string $flag, $numbers): bool /** * Bulk Clear Flag for Messages. * - * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft - * @param array|MessageIterator|string $numbers Message numbers + * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft + * @param array|MessageIteratorInterface|string $numbers Message numbers */ public function clearFlag(string $flag, $numbers): bool { @@ -277,8 +277,8 @@ public function getThread(): array /** * Bulk move messages. * - * @param array|MessageIterator|string $numbers Message numbers - * @param MailboxInterface $mailbox Destination Mailbox to move the messages to + * @param array|MessageIteratorInterface|string $numbers Message numbers + * @param MailboxInterface $mailbox Destination Mailbox to move the messages to * * @throws \Ddeboer\Imap\Exception\MessageMoveException */ @@ -292,8 +292,8 @@ public function move($numbers, MailboxInterface $mailbox): void /** * Bulk copy messages. * - * @param array|MessageIterator|string $numbers Message numbers - * @param MailboxInterface $mailbox Destination Mailbox to copy the messages to + * @param array|MessageIteratorInterface|string $numbers Message numbers + * @param MailboxInterface $mailbox Destination Mailbox to copy the messages to * * @throws \Ddeboer\Imap\Exception\MessageCopyException */