Generator/Render/ClassAnnotation.php
public function render($nesting = 0, $annotation_nesting = 0) {
    $docblock_lines = [];

    $indent = str_repeat('  ', $nesting);

    // Simple string annotation.
    if (is_string($this->data)) {
      // Quote the value.
      $value = '"' . $this->data . '"';

      // If this is the top-level annotation, then the whole thing is a single
      // line and there is no terminal comma.
      $docblock_lines[] = "@{$this->annotationClassName}({$value})" . ($nesting ? ',' : '');
    }
    else {
      // First line for the annotation key / class.
      $docblock_lines[] = "@{$this->annotationClassName}(";

      // Render the array of data recursively, including any nested annotations.
      $this->renderArray($docblock_lines, $this->data, $nesting + 1, $annotation_nesting);

      $docblock_lines[] = $indent . ")" . ($nesting ? ',' : '');
    }

    return $docblock_lines;
  }
public function render($nesting = 0, $annotation_nesting = 0) {
    $docblock_lines = [];

    $indent = str_repeat('  ', $nesting);

    // Simple string annotation.
    if (is_string($this->data)) {
      // Quote the value.
      $value = '"' . $this->data . '"';

      // If this is the top-level annotation, then the whole thing is a single
      // line and there is no terminal comma.
      $docblock_lines[] = "@{$this->annotationClassName}({$value})" . ($nesting ? ',' : '');
    }
    else {
      // First line for the annotation key / class.
      $docblock_lines[] = "@{$this->annotationClassName}(";

      // Render the array of data recursively, including any nested annotations.
      $this->renderArray($docblock_lines, $this->data, $nesting + 1, $annotation_nesting);

      $docblock_lines[] = $indent . ")" . ($nesting ? ',' : '');
    }

    return $docblock_lines;
  }
public function render ( $ nesting = 0 , $ annotation_nesting = 0 ) { $ docblock_lines = [ ] ; $ indent = str_repeat ( '  ' , $ nesting ) ; // Simple string annotation. if ( is_string ( $ this -> data ) ) { // Quote the value. $ value = '"' . $ this -> data . '"' ; // If this is the top-level annotation, then the whole thing is a single // line and there is no terminal comma. $ docblock_lines [ ] = "@{$this->annotationClassName}({$value})" . ( $ nesting ? ',' : '' ) ; } else { // First line for the annotation key / class. $ docblock_lines [ ] = "@{$this->annotationClassName}(" ; // Render the array of data recursively, including any nested annotations. $ this -> renderArray ( $ docblock_lines , $ this -> data , $ nesting + 1 , $ annotation_nesting ) ; $ docblock_lines [ ] = $ indent . ")" . ( $ nesting ? ',' : '' ) ; } return $ docblock_lines ; }
Renders the annotation as text lines without docblock formatting.

@param int $nesting
(optional) Internal. The current nesting level of the overal data.
@param int $annotation_nesting
(optional) Internal. The current nesting level in the current annotation.

@return string[]
The rendered lines of code.
Renders the annotation as text lines without docblock formatting .