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='')
|
public function numMessages($mailbox='')
|
||||||
{
|
{
|
||||||
|
$cnt = 0;
|
||||||
if ($mailbox==='') {
|
if ($mailbox==='') {
|
||||||
return imap_num_msg($this->getImapStream());
|
$cnt = imap_num_msg($this->getImapStream());
|
||||||
|
} elseif ($this->hasMailbox($mailbox) && $mailbox !== '') {
|
||||||
|
$oldMailbox = $this->getMailBox();
|
||||||
|
$this->setMailbox($mailbox);
|
||||||
|
$cnt = $this->numMessages();
|
||||||
|
$this->setMailbox($oldMailbox);
|
||||||
}
|
}
|
||||||
if (!$this->hasMailbox($mailbox) && $mailbox !== '') {
|
return ((int)$cnt);
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
$oldMailbox = $this->getMailBox();
|
|
||||||
$this->setMailbox($mailbox);
|
|
||||||
$cnt = $this->numMessages();
|
|
||||||
$this->setMailbox($oldMailbox);
|
|
||||||
return $cnt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user