Skip to content

Commit e76dadc

Browse files
committed
SlevomatCodingStandard.Commenting.UselessFunctionDocComment: Fixed false positive
1 parent 4166003 commit e76dadc

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

SlevomatCodingStandard/Helpers/PhpDocParserHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static function getLexer(): Lexer
2222
static $lexer;
2323

2424
if ($lexer === null) {
25-
$lexer = new Lexer();
25+
$lexer = new Lexer(true);
2626
}
2727

2828
return $lexer;

tests/Sniffs/Commenting/data/uselessFunctionDocCommentSniffNoErrors.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,18 @@ public function onlyParameterWithoutType(int $a): void
177177
{
178178
}
179179

180+
/**
181+
* @SomeAnnotation
182+
*/
183+
public function specificAnnotation(): void
184+
{
185+
}
186+
187+
/**
188+
* @\SomeOtherAnnotation
189+
*/
190+
public function specificAnnotationInFQN(): void
191+
{
192+
}
193+
180194
}

0 commit comments

Comments
 (0)