We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a932e3 commit c503d73Copy full SHA for c503d73
src/Rules/Playground/PhpdocCommentRule.php
@@ -41,8 +41,10 @@ public function processNode(Node $node, Scope $scope): array
41
continue;
42
}
43
44
- if (str_starts_with($comment->getText(), '/**')) {
45
- continue;
+ foreach(['/**', '//', '#'] as $startTag) {
+ if (str_starts_with($comment->getText(), $startTag)) {
46
+ continue 2;
47
+ }
48
49
50
$errors[] = RuleErrorBuilder::message('Comment contains phpdoc-tag but does not start with /** tag.')
tests/PHPStan/Rules/Playground/data/comments.php
@@ -32,4 +32,7 @@ public function getBar(): FooInterface
32
{
33
return $this->foo;
34
35
+
36
+ // this should not error: @var
37
+ # this should not error: @var
38
0 commit comments