Skip to content

Commit

Permalink
InvalidPHPStanDocTagRule - added forgotten handling of ClassConst
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Mar 9, 2023
1 parent 9c2552b commit d943d58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Rules/PhpDoc/InvalidPHPStanDocTagRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function processNode(Node $node, Scope $scope): array
&& !$node instanceof Node\Stmt\Property
&& !$node instanceof Node\Expr\Assign
&& !$node instanceof Node\Expr\AssignRef
&& !$node instanceof Node\Stmt\ClassConst
) {
return [];
}
Expand Down
6 changes: 3 additions & 3 deletions tests/PHPStan/Rules/PhpDoc/InvalidPHPStanDocTagRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ public function dataRule(): iterable
'Unknown PHPDoc tag: @phpstan-varr',
44,
],
];
yield [false, $errors];
yield [true, array_merge($errors, [
[
'Unknown PHPDoc tag: @phpstan-varr',
47,
],
];
yield [false, $errors];
yield [true, array_merge($errors, [
[
'Unknown PHPDoc tag: @phpstan-varr',
57,
Expand Down

0 comments on commit d943d58

Please sign in to comment.