PSR getting on my nerves again

This commit is contained in:
Lewis Cowles 2015-05-24 12:53:50 +01:00
parent 44a2080f3e
commit 5317b9955f

View File

@ -323,17 +323,16 @@ class Server
*/
public function numMessages($mailbox='')
{
$cnt = 0;
if ($mailbox==='') {
return imap_num_msg($this->getImapStream());
}
if (!$this->hasMailbox($mailbox) && $mailbox !== '') {
return 0;
}
$cnt = imap_num_msg($this->getImapStream());
} elseif ($this->hasMailbox($mailbox) && $mailbox !== '') {
$oldMailbox = $this->getMailBox();
$this->setMailbox($mailbox);
$cnt = $this->numMessages();
$this->setMailbox($oldMailbox);
return $cnt;
}
return ((int)$cnt);
}
/**