code: public function getAnnotationsOfType($types)
      {
          $annotations = [];
          $types = (array) $types;
  
          foreach ($this->getAnnotations() as $annotation) {
              $tag = $annotation->getTag()->getName();
              foreach ($types as $type) {
                  if ($type === $tag) {
                      $annotations[] = $annotation;
                  }
              }
          }
  
          return $annotations;
      }
docs: Get specific types of annotations only.
  
  If none exist, we're returning an empty array.
  
  @param string|string[] $types
  
  @return Annotation[]