Added type expansion for the @param tag

This commit is contained in:
Mike van Riel
2012-06-21 22:51:29 +02:00
parent cd252c1f09
commit bbac3fa418
3 changed files with 125 additions and 2 deletions
@@ -33,7 +33,7 @@ class Tag implements \Reflector
/** @var int line number of the tag */
protected $line_number = 0;
/** @var object docblock class */
/** @var \phpDocumentor\Reflection\DocBlock docblock class */
protected $docblock;
/**
@@ -63,7 +63,12 @@ class ParamTag extends Tag
public function getTypes()
{
$types = explode('|', $this->type);
array_walk($types, 'trim');
foreach ($types as &$type) {
$type = !empty($type) && $this->docblock
? $this->docblock->expandType($type)
: trim($type);
}
return $types;
}