original_string: public function tag($tag, $attr = null, $content = null, $close = false)
      {
          $tag = strtolower($tag);
  
          if (! empty($attr) && is_array($attr)) {
              $attr = $this->Attr->attr($attr);
          }
  
          if ($close) {
              return sprintf('<%s%s>%s</%1$s>', $tag, $attr, $content);
          } else {
              return sprintf('<%s%s>', $tag, $attr);
          }
      }
code: public function tag($tag, $attr = null, $content = null, $close = false)
      {
          $tag = strtolower($tag);
  
          if (! empty($attr) && is_array($attr)) {
              $attr = $this->Attr->attr($attr);
          }
  
          if ($close) {
              return sprintf('<%s%s>%s</%1$s>', $tag, $attr, $content);
          } else {
              return sprintf('<%s%s>', $tag, $attr);
          }
      }
code_tokens: public function tag ( $ tag , $ attr = null , $ content = null , $ close = false ) { $ tag = strtolower ( $ tag ) ; if ( ! empty ( $ attr ) && is_array ( $ attr ) ) { $ attr = $ this -> Attr -> attr ( $ attr ) ; } if ( $ close ) { return sprintf ( '<%s%s>%s</%1$s>' , $ tag , $ attr , $ content ) ; } else { return sprintf ( '<%s%s>' , $ tag , $ attr ) ; } }
docstring: render a tag
  
  @param   string      tag to render
  @param   array       attributes for the tag
  @param   string      contents of tag when not self closing
  @param   bool        close the tag?
  @return  string
docstring_tokens: render a tag