original_string: public function getMessage($type = null, $key = 'messages')
      {
          if (isset($type)) {
              $key .= ".$type";
          }
  
          $message = $this->get($key, array());
          $this->delete($key);
          return $message;
      }
code: public function getMessage($type = null, $key = 'messages')
      {
          if (isset($type)) {
              $key .= ".$type";
          }
  
          $message = $this->get($key, array());
          $this->delete($key);
          return $message;
      }
code_tokens: public function getMessage ( $ type = null , $ key = 'messages' ) { if ( isset ( $ type ) ) { $ key .= ".$type" ; } $ message = $ this -> get ( $ key , array ( ) ) ; $ this -> delete ( $ key ) ; return $ message ; }
docstring: Returns messages from the session
  @param string $type
  @param string $key
  @return string|array
docstring_tokens: Returns messages from the session