mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-17 17:47:13 +00:00
Parse template tag for generics (#21)
* Parse template tag for generics * Fixed templatetag docblock * Fixed PHP 7 issue * Fixed PHP 7.2 issue * Fixed another 7.2 issue
This commit is contained in:
@@ -336,4 +336,22 @@ DOCBLOCK;
|
||||
$this->assertCount(1, $object->getTagsByName('return'));
|
||||
$this->assertCount(2, $object->getTagsByName('param'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Barryvdh\Reflection\DocBlock::parseTags
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testGenericsAreParsed()
|
||||
{
|
||||
$fixture = <<<DOCBLOCK
|
||||
/**
|
||||
* @template TValue
|
||||
* @param TValue
|
||||
* @return TValue
|
||||
*/
|
||||
DOCBLOCK;
|
||||
$object = new DocBlock($fixture);
|
||||
$this->assertSame(array('TValue'), $object->getGenerics());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user