From 44a2080f3ed0a11b018ed29c79d15c9a6a474311 Mon Sep 17 00:00:00 2001 From: Lewis Cowles Date: Sun, 24 May 2015 12:46:35 +0100 Subject: [PATCH] Update Server.php --- src/Fetch/Server.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 743f6db..b59b731 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -319,19 +319,19 @@ class Server * This returns the number of messages that the current mailbox contains. * * @param string $mailbox the mailbox path if required to get sub-folder counts - * @return int + * @return int */ public function numMessages($mailbox='') { - if ($mailbox===''){ - return imap_num_msg( $this->getImapStream() ); + if ($mailbox==='') { + return imap_num_msg($this->getImapStream()); } - if (!$this->hasMailbox($mailbox) && $mailbox !== ''){ + if (!$this->hasMailbox($mailbox) && $mailbox !== '') { return 0; } $oldMailbox = $this->getMailBox(); $this->setMailbox($mailbox); - $cnt = imap_num_msg($this->getImapStream()); + $cnt = $this->numMessages(); $this->setMailbox($oldMailbox); return $cnt; }