Ejemplo n.º 1
0
 /**
  * Get return type tag
  *
  * @throws Exception\InvalidArgumentException
  * @return DocBlock\Tag\ReturnTag
  */
 public function getReturn()
 {
     $docBlock = $this->getDocBlock();
     if (!$docBlock->hasTag('return')) {
         throw new Exception\InvalidArgumentException('Function does not specify an @return annotation tag; cannot determine return type');
     }
     $tag = $docBlock->getTag('return');
     $return = DocBlockReflection::factory('@return ' . $tag->getDescription());
     return $return;
 }