mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-02-06 10:39:21 +03:00
PSR getting on my nerves again
This commit is contained in:
parent
44a2080f3e
commit
5317b9955f
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user