original_string: public function mailboxes($mailboxSearch = '*', $withConnection = false)
      {
          $connectionString = $this->connectionString();
          $stream = imap_open($connectionString, $this->user, $this->password);
          $mailboxes = imap_list($stream, $connectionString, $mailboxSearch);
  
          if ($withConnection) {
              return $mailboxes;
          }
  
          return array_map(function ($mailbox) use ($connectionString) {
              return str_replace($connectionString, '', $mailbox);
          }, $mailboxes);
      }
code: public function mailboxes($mailboxSearch = '*', $withConnection = false)
      {
          $connectionString = $this->connectionString();
          $stream = imap_open($connectionString, $this->user, $this->password);
          $mailboxes = imap_list($stream, $connectionString, $mailboxSearch);
  
          if ($withConnection) {
              return $mailboxes;
          }
  
          return array_map(function ($mailbox) use ($connectionString) {
              return str_replace($connectionString, '', $mailbox);
          }, $mailboxes);
      }
code_tokens: public function mailboxes ( $ mailboxSearch = '*' , $ withConnection = false ) { $ connectionString = $ this -> connectionString ( ) ; $ stream = imap_open ( $ connectionString , $ this -> user , $ this -> password ) ; $ mailboxes = imap_list ( $ stream , $ connectionString , $ mailboxSearch ) ; if ( $ withConnection ) { return $ mailboxes ; } return array_map ( function ( $ mailbox ) use ( $ connectionString ) { return str_replace ( $ connectionString , '' , $ mailbox ) ; } , $ mailboxes ) ; }
docstring: Get a list of mailboxes on the mail server.
  
  @param  string $mailboxSearch Pattern from http://php.net/manual/en/function.imap-list.php
  @param  bool $withConnection Will strip off connection string from mailboxes by default
  @return array List of mailboxes
docstring_tokens: Get a list of mailboxes on the mail server .