Skip to content

Commit d943d58

Browse files
committedMar 9, 2023
InvalidPHPStanDocTagRule - added forgotten handling of ClassConst
1 parent 9c2552b commit d943d58

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎src/Rules/PhpDoc/InvalidPHPStanDocTagRule.php

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function processNode(Node $node, Scope $scope): array
7777
&& !$node instanceof Node\Stmt\Property
7878
&& !$node instanceof Node\Expr\Assign
7979
&& !$node instanceof Node\Expr\AssignRef
80+
&& !$node instanceof Node\Stmt\ClassConst
8081
) {
8182
return [];
8283
}

‎tests/PHPStan/Rules/PhpDoc/InvalidPHPStanDocTagRuleTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ public function dataRule(): iterable
4040
'Unknown PHPDoc tag: @phpstan-varr',
4141
44,
4242
],
43-
];
44-
yield [false, $errors];
45-
yield [true, array_merge($errors, [
4643
[
4744
'Unknown PHPDoc tag: @phpstan-varr',
4845
47,
4946
],
47+
];
48+
yield [false, $errors];
49+
yield [true, array_merge($errors, [
5050
[
5151
'Unknown PHPDoc tag: @phpstan-varr',
5252
57,

0 commit comments

Comments
 (0)
Please sign in to comment.