original_string: protected function getIrcMessage($type, array $params = array())
      {
          $message = '';
          if ($this->prefix) {
              $message .= ':' . $this->prefix . ' ';
          }
          $message .= $type;
  
          $params = array_filter($params, function($param) {
              return $param !== null;
          });
          if ($params) {
              $last = end($params);
              $params[key($params)] = ':' . $last; 
              $message .= ' ' . implode(' ', $params);
          }
          
          $message .= "\r\n";
          return $message;
      }
code: protected function getIrcMessage($type, array $params = array())
      {
          $message = '';
          if ($this->prefix) {
              $message .= ':' . $this->prefix . ' ';
          }
          $message .= $type;
  
          $params = array_filter($params, function($param) {
              return $param !== null;
          });
          if ($params) {
              $last = end($params);
              $params[key($params)] = ':' . $last; 
              $message .= ' ' . implode(' ', $params);
          }
          
          $message .= "\r\n";
          return $message;
      }
code_tokens: protected function getIrcMessage ( $ type , array $ params = array ( ) ) { $ message = '' ; if ( $ this -> prefix ) { $ message .= ':' . $ this -> prefix . ' ' ; } $ message .= $ type ; $ params = array_filter ( $ params , function ( $ param ) { return $ param !== null ; } ) ; if ( $ params ) { $ last = end ( $ params ) ; $ params [ key ( $ params ) ] = ':' . $ last ; $ message .= ' ' . implode ( ' ' , $ params ) ; } $ message .= "\r\n" ; return $ message ; }
docstring: Returns a formatted IRC message.
  
  @param string $type Command or response code
  @param array $params Optional message parameters
  @return string
docstring_tokens: Returns a formatted IRC message .