Skip to content

Commit db9bef4

Browse files
jiripudilondrejmirtes
authored andcommitted
resolve template-contravariant
1 parent ec31e41 commit db9bef4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/PhpDoc/PhpDocNodeResolver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ public function resolveTemplateTags(PhpDocNode $phpDocNode, NameScope $nameScope
264264
$variance = TemplateTypeVariance::createInvariant();
265265
} elseif (in_array($tagName, ['@template-covariant', '@psalm-template-covariant', '@phpstan-template-covariant'], true)) {
266266
$variance = TemplateTypeVariance::createCovariant();
267+
} elseif (in_array($tagName, ['@template-contravariant', '@psalm-template-contravariant', '@phpstan-template-contravariant'], true)) {
268+
$variance = TemplateTypeVariance::createContravariant();
267269
} else {
268270
continue;
269271
}

0 commit comments

Comments
 (0)