Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interface support for dead docblock #51

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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|[tT]rait)\s+\w+$#';
private const STANDALONE_COMMENT_CLASS_REGEX = '#\/\/\s+(class|trait|interface)\s+\w+$#i';

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

/**
* @see https://regex101.com/r/bzbxXz/2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

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

/**
* Interface SomeInterface
*/
interface SomeInterface
{
}

?>
-----
<?php

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

/**
*/
interface SomeInterface
{
}

?>
Loading