More PSR BS!

This commit is contained in:
Lewis Cowles 2015-05-24 11:37:16 +01:00
parent 53b3aabca0
commit 030dade51b

View File

@ -321,18 +321,18 @@ class Server
* @param string $mailbox the mailbox path if required to get sub-folder counts
* @return int
*/
public function numMessages( $mailbox='' )
public function numMessages($mailbox='')
{
$mboxExists = $this->hasMailbox( $mailbox );
if( $mboxExists ) {
$mboxExists = $this->hasMailbox($mailbox);
if ($mboxExists){
$oldMailbox = $this->getMailBox();
$this->setMailbox( $mailbox );
$this->setMailbox($mailbox);
}
$cnt = imap_num_msg( $this->getImapStream() );
if( $mboxExists ) {
$this->setMailbox( $oldMailbox );
$cnt = imap_num_msg($this->getImapStream());
if ( $mboxExists ){
$this->setMailbox($oldMailbox);
}
return ( !$mboxExists && $mailbox !== '' ) ? 0 : $cnt;
return ((!$mboxExists && $mailbox !== '') ? 0 : $cnt);
}
/**