mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Added type expansion for the @param tag
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user