mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-12-02 09:28:02 +01:00
Support @template-contravariant tags
This commit is contained in:
parent
25ddf938d8
commit
135607f9cc
@ -178,6 +178,9 @@ class PhpDocParser
|
|||||||
case '@template-covariant':
|
case '@template-covariant':
|
||||||
case '@phpstan-template-covariant':
|
case '@phpstan-template-covariant':
|
||||||
case '@psalm-template-covariant':
|
case '@psalm-template-covariant':
|
||||||
|
case '@template-contravariant':
|
||||||
|
case '@phpstan-template-contravariant':
|
||||||
|
case '@psalm-template-contravariant':
|
||||||
$tagValue = $this->parseTemplateTagValue($tokens);
|
$tagValue = $this->parseTemplateTagValue($tokens);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3323,6 +3323,21 @@ some text in the middle'
|
|||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
yield [
|
||||||
|
'OK with contravariance',
|
||||||
|
'/** @template-contravariant T */',
|
||||||
|
new PhpDocNode([
|
||||||
|
new PhpDocTagNode(
|
||||||
|
'@template-contravariant',
|
||||||
|
new TemplateTagValueNode(
|
||||||
|
'T',
|
||||||
|
null,
|
||||||
|
''
|
||||||
|
)
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function provideExtendsTagsData(): Iterator
|
public function provideExtendsTagsData(): Iterator
|
||||||
|
Loading…
Reference in New Issue
Block a user