Skip to content

Commit 9c2552b

Browse files
committed
Bleeding edge - InvalidPHPStanDocTagRule in StubValidator
1 parent 9780d35 commit 9c2552b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/PhpDoc/StubValidator.php

+9
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
use PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule;
5151
use PHPStan\Rules\PhpDoc\IncompatiblePropertyPhpDocTypeRule;
5252
use PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule;
53+
use PHPStan\Rules\PhpDoc\InvalidPHPStanDocTagRule;
5354
use PHPStan\Rules\PhpDoc\InvalidThrowsPhpDocValueRule;
5455
use PHPStan\Rules\PhpDoc\UnresolvableTypeHelper;
5556
use PHPStan\Rules\Properties\ExistingClassesInPropertiesRule;
@@ -197,6 +198,14 @@ private function getRuleRegistry(Container $container): RuleRegistry
197198
$rules[] = new DuplicateFunctionDeclarationRule($reflector, $relativePathHelper);
198199
}
199200

201+
if ((bool) $container->getParameter('featureToggles')['allInvalidPhpDocs']) {
202+
$rules[] = new InvalidPHPStanDocTagRule(
203+
$container->getByType(Lexer::class),
204+
$container->getByType(PhpDocParser::class),
205+
true,
206+
);
207+
}
208+
200209
return new DirectRuleRegistry($rules);
201210
}
202211

0 commit comments

Comments
 (0)