mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-02-11 12:39:26 +03:00
More PSR BS!
This commit is contained in:
parent
53b3aabca0
commit
030dade51b
@ -321,18 +321,18 @@ class Server
|
|||||||
* @param string $mailbox the mailbox path if required to get sub-folder counts
|
* @param string $mailbox the mailbox path if required to get sub-folder counts
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function numMessages( $mailbox='' )
|
public function numMessages($mailbox='')
|
||||||
{
|
{
|
||||||
$mboxExists = $this->hasMailbox( $mailbox );
|
$mboxExists = $this->hasMailbox($mailbox);
|
||||||
if( $mboxExists ) {
|
if ($mboxExists){
|
||||||
$oldMailbox = $this->getMailBox();
|
$oldMailbox = $this->getMailBox();
|
||||||
$this->setMailbox( $mailbox );
|
$this->setMailbox($mailbox);
|
||||||
}
|
}
|
||||||
$cnt = imap_num_msg( $this->getImapStream() );
|
$cnt = imap_num_msg($this->getImapStream());
|
||||||
if( $mboxExists ) {
|
if ( $mboxExists ){
|
||||||
$this->setMailbox( $oldMailbox );
|
$this->setMailbox($oldMailbox);
|
||||||
}
|
}
|
||||||
return ( !$mboxExists && $mailbox !== '' ) ? 0 : $cnt;
|
return ((!$mboxExists && $mailbox !== '') ? 0 : $cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user