private function prepareCallable(AbstractASTCallable $callable)
{
// Skip, if ignore annotations is set
if ($this->ignoreAnnotations === true) {
return;
}
// Get all @throws Types
$throws = $this->parseThrowsAnnotations($callable->getComment());
foreach ($throws as $qualifiedName) {
$callable->addExceptionClassReference($this->builder->buildAstClassOrInterfaceReference($qualifiedName));
}
// Stop here if return class already exists.
if ($callable->hasReturnClass()) {
return;
}
// Get return annotation
$qualifiedName = $this->parseReturnAnnotation($callable->getComment());
if ($qualifiedName !== null) {
$callable->setReturnClassReference($this->builder->buildAstClassOrInterfaceReference($qualifiedName));
}
}