File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,13 @@ final class UselessDocBlockCleaner
4747 * @see https://regex101.com/r/RzTdFH/4
4848 * @var string
4949 */
50- private const STANDALONE_COMMENT_CLASS_REGEX = '#\/\/\s+[cC]lass\s+\w+$# ' ;
50+ private const STANDALONE_COMMENT_CLASS_REGEX = '#\/\/\s+( [cC]lass|[tT]rait) \s+\w+$# ' ;
5151
5252 /**
5353 * @see https://regex101.com/r/RzTdFH/4
5454 * @var string
5555 */
56- private const INLINE_COMMENT_CLASS_REGEX = '#( \*|\/\/)\s+[cC]lass\s+(\w+)\n# ' ;
56+ private const INLINE_COMMENT_CLASS_REGEX = '#( \*|\/\/)\s+( [cC]lass|[tT]rait) \s+(\w+)\n# ' ;
5757
5858 /**
5959 * @see https://regex101.com/r/bzbxXz/2
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Symplify \CodingStandard \Tests \Fixer \Commenting \RemoveUselessDefaultCommentFixer \Fixture ;
4+
5+ /**
6+ * Trait SomeTrait
7+ */
8+ trait SomeTrait
9+ {
10+ }
11+
12+ ?>
13+ -----
14+ <?php
15+
16+ namespace Symplify \CodingStandard \Tests \Fixer \Commenting \RemoveUselessDefaultCommentFixer \Fixture ;
17+
18+ /**
19+ */
20+ trait SomeTrait
21+ {
22+ }
23+
24+ ?>
You can’t perform that action at this time.
0 commit comments