Skip to content

Commit

Permalink
add trait support
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jul 18, 2024
1 parent 21fa9ea commit 8a03672
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DocBlock/UselessDocBlockCleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ final class UselessDocBlockCleaner
* @see https://regex101.com/r/RzTdFH/4
* @var string
*/
private const STANDALONE_COMMENT_CLASS_REGEX = '#\/\/\s+[cC]lass\s+\w+$#';
private const STANDALONE_COMMENT_CLASS_REGEX = '#\/\/\s+([cC]lass|[tT]rait)\s+\w+$#';

/**
* @see https://regex101.com/r/RzTdFH/4
* @var string
*/
private const INLINE_COMMENT_CLASS_REGEX = '#( \*|\/\/)\s+[cC]lass\s+(\w+)\n#';
private const INLINE_COMMENT_CLASS_REGEX = '#( \*|\/\/)\s+([cC]lass|[tT]rait)\s+(\w+)\n#';

/**
* @see https://regex101.com/r/bzbxXz/2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ trait SomeTrait

namespace Symplify\CodingStandard\Tests\Fixer\Commenting\RemoveUselessDefaultCommentFixer\Fixture;

/**
*/
trait SomeTrait
{
}
Expand Down

0 comments on commit 8a03672

Please sign in to comment.