Skip to content

Conversation

rodrigoprimo
Copy link
Contributor

Description

As suggested by @jrfnl in #340 (comment), this PR changes the Squiz.Commenting.ClosingDeclarationComment sniff to require a closing declaration comment for traits as well.

Suggested changelog entry

Squiz.Commenting.ClosingDeclarationComment: closing declaration comments are now required for traits.

Related issues/external references

Suggested in #340 (comment)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

  • I have checked there is no other PR open for the same change.
  • I have read the Contribution Guidelines.
  • I grant the project the right to include and distribute the code under the BSD-3-Clause license (and I have the right to grant these rights).
  • I have added tests to cover my changes.
  • I have verified that the code complies with the projects coding standards.
  • [Required for new sniffs] I have added XML documentation for the sniff.
Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks @rodrigoprimo !

I'm milestoning the PR for the 3.10.0 release as it effectively adds a new feature.

@jrfnl jrfnl added this to the 3.10.0 milestone Apr 10, 2024
This should make it easier to find if a given is registered by this sniff or not.
Now this sniff will also check for the closing declaration comment in traits.
@jrfnl jrfnl force-pushed the add-trait-support-to-closing-declaration-comment-sniff branch from ece17e5 to 6edc97e Compare April 23, 2024 21:36
@jrfnl
Copy link
Member

jrfnl commented Apr 23, 2024

Rebased without changes. Merging once the build passes.

@jrfnl jrfnl merged commit c5f7f69 into PHPCSStandards:master Apr 23, 2024
jrfnl pushed a commit that referenced this pull request Apr 23, 2024
* Squiz/ClosingDeclarationComment: sort registered tokens alphabetically This should make it easier to find if a given is registered by this sniff or not. * Squiz/ClosingDeclarationComment: add trait support Now this sniff will also check for the closing declaration comment in traits.
@rodrigoprimo rodrigoprimo deleted the add-trait-support-to-closing-declaration-comment-sniff branch April 24, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment