original_string: public static function nonempty_tag($tagname, $contents, array $attributes = null) {
          if ($contents === '' || is_null($contents)) {
              return '';
          }
          return self::tag($tagname, $contents, $attributes);
      }
code: public static function nonempty_tag($tagname, $contents, array $attributes = null) {
          if ($contents === '' || is_null($contents)) {
              return '';
          }
          return self::tag($tagname, $contents, $attributes);
      }
code_tokens: public static function nonempty_tag ( $ tagname , $ contents , array $ attributes = null ) { if ( $ contents === '' || is_null ( $ contents ) ) { return '' ; } return self :: tag ( $ tagname , $ contents , $ attributes ) ; }
docstring: Outputs a tag, but only if the contents are not empty
  
  @param string $tagname The name of tag ('a', 'img', 'span' etc.)
  @param string $contents What goes between the opening and closing tags
  @param array $attributes The tag attributes (array('src' => $url, 'class' => 'class1') etc.)
  @return string HTML fragment
docstring_tokens: Outputs a tag but only if the contents are not empty