Generator/FormattingTrait/PHPFormattingTrait.php
function docBlock($lines) {
    if (!is_array($lines)) {
      $lines = array($lines);
    }

    $lines = array_merge(
      array("/**"),
      array_map(function ($line) {
        if (empty($line)) {
          return ' *';
        }
        return " * $line";
      }, $lines),
      array(" */")
    );

    return $lines;
  }
function docBlock($lines) {
    if (!is_array($lines)) {
      $lines = array($lines);
    }

    $lines = array_merge(
      array("/**"),
      array_map(function ($line) {
        if (empty($line)) {
          return ' *';
        }
        return " * $line";
      }, $lines),
      array(" */")
    );

    return $lines;
  }
function docBlock ( $ lines ) { if ( ! is_array ( $ lines ) ) { $ lines = array ( $ lines ) ; } $ lines = array_merge ( array ( "/**" ) , array_map ( function ( $ line ) { if ( empty ( $ line ) ) { return ' *' ; } return " * $line" ; } , $ lines ) , array ( " */" ) ) ; return $ lines ; }
Helper to format text as docblock.

@param @lines
An array of lines, or a single line of text. Lines to be normally indented
should have no leading whitespace.

@return
An array of lines for the docblock with start and end PHP comment markers.
Helper to format text as docblock .