From 288a2402a05a906edcd4e83785ef310c98161623 Mon Sep 17 00:00:00 2001 From: Carlos Alandete Sastre Date: Sat, 27 Apr 2024 13:07:03 +0200 Subject: [PATCH] Fix template type on throws doc --- .../Relation/DocComment/MethodScope/ThrowsTagExtractor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Rule/Extractor/Relation/DocComment/MethodScope/ThrowsTagExtractor.php b/src/Rule/Extractor/Relation/DocComment/MethodScope/ThrowsTagExtractor.php index 3b3b84da..94013594 100644 --- a/src/Rule/Extractor/Relation/DocComment/MethodScope/ThrowsTagExtractor.php +++ b/src/Rule/Extractor/Relation/DocComment/MethodScope/ThrowsTagExtractor.php @@ -4,6 +4,7 @@ use PhpParser\Node; use PHPStan\Analyser\Scope; +use PHPStan\Node\InClassMethodNode; use PHPStan\PhpDoc\Tag\ThrowsTag; use PHPStan\ShouldNotHappenException; @@ -11,7 +12,7 @@ trait ThrowsTagExtractor { public function getNodeType(): string { - return Node\Stmt\ClassMethod::class; + return InClassMethodNode::class; } /**