Skip to content

fix(InlineComment): Allow custom docblock tags (#3367776)

Previously, the InlineComment sniff flagged inline DocBlocks as long as they did not contain a '@var' tag. As noted in #3367776, it is desirable to also allow other (possibly custom) docblock tags.

This commit updates InlineCommentSniff.php to allow any inline doc blocks that start with a doc comment tag, e.g. /** @var */. Any trailing content is allowed, however the docblock tag must be first.

This commit also adds appropriate test cases to InlineCommentSniff.php.

Closes #3367776

Merge request reports

Loading