original_string: private function message_has_flag($messageid, $flag) {
          // Get the current mailbox.
          $mailbox = $this->get_mailbox();
  
          // Grab messagedata including flags.
          $query = new \Horde_Imap_Client_Fetch_Query();
          $query->flags();
          $query->structure();
          $messagedata = $this->client->fetch($mailbox, $query, array(
              'ids' => $messageid,
          ))->first();
          $flags = $messagedata->getFlags();
  
          return in_array($flag, $flags);
      }
code: private function message_has_flag($messageid, $flag) {
          // Get the current mailbox.
          $mailbox = $this->get_mailbox();
  
          // Grab messagedata including flags.
          $query = new \Horde_Imap_Client_Fetch_Query();
          $query->flags();
          $query->structure();
          $messagedata = $this->client->fetch($mailbox, $query, array(
              'ids' => $messageid,
          ))->first();
          $flags = $messagedata->getFlags();
  
          return in_array($flag, $flags);
      }
code_tokens: private function message_has_flag ( $ messageid , $ flag ) { // Get the current mailbox. $ mailbox = $ this -> get_mailbox ( ) ; // Grab messagedata including flags. $ query = new \ Horde_Imap_Client_Fetch_Query ( ) ; $ query -> flags ( ) ; $ query -> structure ( ) ; $ messagedata = $ this -> client -> fetch ( $ mailbox , $ query , array ( 'ids' => $ messageid , ) ) -> first ( ) ; $ flags = $ messagedata -> getFlags ( ) ; return in_array ( $ flag , $ flags ) ; }
docstring: Check whether the message has the specified flag
  
  @param mixed $messageid
  @param string $flag The flag to check
  @return bool
docstring_tokens: Check whether the message has the specified flag