Skip to content

Commit 40f9f94

Browse files
committed
Missing phpdoc exceptions added
1 parent b29af05 commit 40f9f94

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/IMAP/Client.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ public function deleteFolder($name, $expunge = true) {
382382
*
383383
* @return MessageCollection
384384
* @throws ConnectionFailedException
385+
* @throws Exceptions\InvalidWhereQueryCriteriaException
385386
* @throws GetMessagesFailedException
386387
* @throws MessageSearchValidationException
387388
*
@@ -403,6 +404,7 @@ public function getMessages(Folder $folder, $criteria = 'ALL', $fetch_options =
403404
*
404405
* @return MessageCollection
405406
* @throws ConnectionFailedException
407+
* @throws Exceptions\InvalidWhereQueryCriteriaException
406408
* @throws GetMessagesFailedException
407409
* @throws MessageSearchValidationException
408410
*
@@ -425,6 +427,7 @@ public function getUnseenMessages(Folder $folder, $criteria = 'UNSEEN', $fetch_o
425427
*
426428
* @return MessageCollection
427429
* @throws ConnectionFailedException
430+
* @throws Exceptions\InvalidWhereQueryCriteriaException
428431
* @throws GetMessagesFailedException
429432
* @throws MessageSearchValidationException
430433
*

src/IMAP/Folder.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ public function setChildren($children = []) {
187187
* @param boolean $fetch_flags
188188
*
189189
* @return Message|null
190+
*
191+
* @throws Exceptions\ConnectionFailedException
192+
* @throws Exceptions\InvalidWhereQueryCriteriaException
193+
* @throws GetMessagesFailedException
194+
* @throws MessageSearchValidationException
190195
*/
191196
public function getMessage($uid, $msglist = null, $fetch_options = null, $fetch_body = false, $fetch_attachment = false, $fetch_flags = true) {
192197
if (imap_msgno($this->getClient()->getConnection(), $uid) > 0) {
@@ -210,8 +215,8 @@ public function getMessage($uid, $msglist = null, $fetch_options = null, $fetch_
210215
*
211216
* @return MessageCollection
212217
* @throws Exceptions\ConnectionFailedException
218+
* @throws Exceptions\InvalidWhereQueryCriteriaException
213219
* @throws GetMessagesFailedException
214-
* @throws MessageSearchValidationException
215220
*/
216221
public function getMessages($criteria = 'ALL', $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = true, $limit = null, $page = 1, $charset = "UTF-8") {
217222

@@ -234,6 +239,7 @@ public function getMessages($criteria = 'ALL', $fetch_options = null, $fetch_bod
234239
*
235240
* @return MessageCollection
236241
* @throws Exceptions\ConnectionFailedException
242+
* @throws Exceptions\InvalidWhereQueryCriteriaException
237243
* @throws GetMessagesFailedException
238244
* @throws MessageSearchValidationException
239245
*
@@ -270,8 +276,8 @@ public function getUnseenMessages($criteria = 'UNSEEN', $fetch_options = null, $
270276
* @return MessageCollection
271277
*
272278
* @throws Exceptions\ConnectionFailedException
279+
* @throws Exceptions\InvalidWhereQueryCriteriaException
273280
* @throws GetMessagesFailedException
274-
* @throws MessageSearchValidationException
275281
*
276282
* @doc http://php.net/manual/en/function.imap-search.php
277283
* imap_search() only supports IMAP2 search criterias, because the function mail_criteria() (from c-client lib)
@@ -404,6 +410,7 @@ public function move($target_mailbox, $expunge = true) {
404410
* SA_ALL - set all of the above
405411
*
406412
* @return object
413+
* @throws Exceptions\ConnectionFailedException
407414
*/
408415
public function getStatus($options) {
409416
return imap_status($this->client->getConnection(), $this->path, $options);
@@ -417,6 +424,7 @@ public function getStatus($options) {
417424
* @param string $internal_date
418425
*
419426
* @return bool
427+
* @throws Exceptions\ConnectionFailedException
420428
*/
421429
public function appendMessage($message, $options = null, $internal_date = null) {
422430
return imap_append($this->client->getConnection(), $this->path, $message, $options, $internal_date);

0 commit comments

Comments
 (0)