Ejemplo n.º 1
0
 /**
  * Extracts documented <b>throws</b> and <b>return</b> types and sets them
  * to the given <b>$callable</b> instance.
  *
  * @param  \PDepend\Source\AST\AbstractASTCallable $callable
  * @return void
  */
 private function prepareCallable(AbstractASTCallable $callable)
 {
     // Skip, if ignore annotations is set
     if ($this->ignoreAnnotations === true) {
         return;
     }
     // Get all @throws Types
     $throws = $this->parseThrowsAnnotations($callable->getDocComment());
     foreach ($throws as $qualifiedName) {
         $callable->addExceptionClassReference($this->builder->buildAstClassOrInterfaceReference($qualifiedName));
     }
     // Get return annotation
     $qualifiedName = $this->parseReturnAnnotation($callable->getDocComment());
     if ($qualifiedName !== null) {
         $callable->setReturnClassReference($this->builder->buildAstClassOrInterfaceReference($qualifiedName));
     }
 }