mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-11-30 04:29:20 +01:00
Add @template-covariant support
This commit is contained in:
parent
18b0e92b63
commit
3edb51540b
@ -161,6 +161,9 @@ class PhpDocParser
|
||||
case '@template':
|
||||
case '@phpstan-template':
|
||||
case '@psalm-template':
|
||||
case '@template-covariant':
|
||||
case '@phpstan-template-covariant':
|
||||
case '@psalm-template-covariant':
|
||||
$tagValue = $this->parseTemplateTagValue($tokens);
|
||||
break;
|
||||
|
||||
|
@ -2371,6 +2371,21 @@ some text in the middle'
|
||||
),
|
||||
]),
|
||||
];
|
||||
|
||||
yield [
|
||||
'OK with covariance',
|
||||
'/** @template-covariant T */',
|
||||
new PhpDocNode([
|
||||
new PhpDocTagNode(
|
||||
'@template-covariant',
|
||||
new TemplateTagValueNode(
|
||||
'T',
|
||||
null,
|
||||
''
|
||||
)
|
||||
),
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
public function provideExtendsTagsData(): \Iterator
|
||||
|
Loading…
Reference in New Issue
Block a user