code: private function findFirstAnnotationOrEnd(DocBlock $doc)
      {
          $index = null;
          foreach ($doc->getLines() as $index => $line) {
              if ($line->containsATag()) {
                  return $index;
              }
          }
  
          return $index; // no Annotation, return the last line
      }
docs: @param DocBlock $doc
  
  @return int