Skip to content

Commit

Permalink
More PSR BS!
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewiscowles1986 committed May 24, 2015
1 parent 53b3aab commit 030dade
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Fetch/Server.php
Expand Up @@ -321,18 +321,18 @@ protected function setImapStream()
* @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);
}

/**
Expand Down

0 comments on commit 030dade

Please sign in to comment.