Skip to content

Commit

Permalink
Add missing rule to StubValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 3, 2024
1 parent 47a85bf commit 085fcf4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PhpDoc/StubValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
use PHPStan\Rules\Generics\InterfaceAncestorsRule;
use PHPStan\Rules\Generics\InterfaceTemplateTypeRule;
use PHPStan\Rules\Generics\MethodSignatureVarianceRule;
use PHPStan\Rules\Generics\MethodTagTemplateTypeCheck;
use PHPStan\Rules\Generics\MethodTagTemplateTypeRule;
use PHPStan\Rules\Generics\MethodTemplateTypeRule;
use PHPStan\Rules\Generics\TemplateTypeCheck;
use PHPStan\Rules\Generics\TraitTemplateTypeRule;
Expand Down Expand Up @@ -178,6 +180,7 @@ private function getRuleRegistry(Container $container): RuleRegistry
$localTypeAliasesCheck = $container->getByType(LocalTypeAliasesCheck::class);
$phpClassReflectionExtension = $container->getByType(PhpClassReflectionExtension::class);
$genericCallableRuleHelper = $container->getByType(GenericCallableRuleHelper::class);
$methodTagTemplateTypeCheck = $container->getByType(MethodTagTemplateTypeCheck::class);

$rules = [
// level 0
Expand All @@ -201,6 +204,7 @@ private function getRuleRegistry(Container $container): RuleRegistry
new InterfaceAncestorsRule($genericAncestorsCheck, $crossCheckInterfacesHelper),
new InterfaceTemplateTypeRule($templateTypeCheck),
new MethodTemplateTypeRule($fileTypeMapper, $templateTypeCheck),
new MethodTagTemplateTypeRule($methodTagTemplateTypeCheck),
new MethodSignatureVarianceRule($varianceCheck),
new TraitTemplateTypeRule($fileTypeMapper, $templateTypeCheck),
new IncompatiblePhpDocTypeRule($fileTypeMapper, $genericObjectTypeCheck, $unresolvableTypeHelper, $genericCallableRuleHelper),
Expand Down

0 comments on commit 085fcf4

Please sign in to comment.