Skip to content

Commit 085fcf4

Browse files
committed
Add missing rule to StubValidator
1 parent 47a85bf commit 085fcf4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PhpDoc/StubValidator.php

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
use PHPStan\Rules\Generics\InterfaceAncestorsRule;
5353
use PHPStan\Rules\Generics\InterfaceTemplateTypeRule;
5454
use PHPStan\Rules\Generics\MethodSignatureVarianceRule;
55+
use PHPStan\Rules\Generics\MethodTagTemplateTypeCheck;
56+
use PHPStan\Rules\Generics\MethodTagTemplateTypeRule;
5557
use PHPStan\Rules\Generics\MethodTemplateTypeRule;
5658
use PHPStan\Rules\Generics\TemplateTypeCheck;
5759
use PHPStan\Rules\Generics\TraitTemplateTypeRule;
@@ -178,6 +180,7 @@ private function getRuleRegistry(Container $container): RuleRegistry
178180
$localTypeAliasesCheck = $container->getByType(LocalTypeAliasesCheck::class);
179181
$phpClassReflectionExtension = $container->getByType(PhpClassReflectionExtension::class);
180182
$genericCallableRuleHelper = $container->getByType(GenericCallableRuleHelper::class);
183+
$methodTagTemplateTypeCheck = $container->getByType(MethodTagTemplateTypeCheck::class);
181184

182185
$rules = [
183186
// level 0
@@ -201,6 +204,7 @@ private function getRuleRegistry(Container $container): RuleRegistry
201204
new InterfaceAncestorsRule($genericAncestorsCheck, $crossCheckInterfacesHelper),
202205
new InterfaceTemplateTypeRule($templateTypeCheck),
203206
new MethodTemplateTypeRule($fileTypeMapper, $templateTypeCheck),
207+
new MethodTagTemplateTypeRule($methodTagTemplateTypeCheck),
204208
new MethodSignatureVarianceRule($varianceCheck),
205209
new TraitTemplateTypeRule($fileTypeMapper, $templateTypeCheck),
206210
new IncompatiblePhpDocTypeRule($fileTypeMapper, $genericObjectTypeCheck, $unresolvableTypeHelper, $genericCallableRuleHelper),

0 commit comments

Comments
 (0)