protected function renderArray(&$docblock_lines, $data, $nesting = 0, $annotation_nesting = 0) {
    $indent = str_repeat('  ', $nesting);

    foreach ($data as $key => $value) {
      if (is_numeric($key)) {
        // Numeric keys are not shown.
        $declaration_line = "{$indent}";
      }
      else {
        // Keys need to be quoted for all levels except the first level of an
        // annotation.
        if ($annotation_nesting != 0) {
          $key = '"' . $key . '"';
        }

        $declaration_line = "{$indent}{$key} = ";
      }

      if (is_string($value)) {
        $value = '"' . $value . '"';

        $declaration_line .= "{$value},";
        $docblock_lines[] = $declaration_line;
      }
      elseif (is_object($value)) {
        // Child annotation. The nesting level doesn't increase here, as the
        // child annotation class is just on the same line as the key.
        // The annotation nesting level is reset, as we are starting a new
        // annotation.
        $sub_lines = $value->render($nesting, 0);

        $declaration_line .= array_shift($sub_lines);
        $docblock_lines[] = $declaration_line;

        $docblock_lines = array_merge($docblock_lines, $sub_lines);
      }
      else {
        // Array of values. Recurse into this method.
        $declaration_line .= '{';
        $docblock_lines[] = $declaration_line;

        $this->renderArray($docblock_lines, $value, $nesting + 1, $annotation_nesting + 1);

        $docblock_lines[] = $indent . "},";
      }
    }

  }