Skip to content

Enforce empty or useless constructor comments can't be used#24140

Merged
sgiehl merged 3 commits into5.x-devfrom
useless-comments
Feb 26, 2026
Merged

Enforce empty or useless constructor comments can't be used#24140
sgiehl merged 3 commits into5.x-devfrom
useless-comments

Conversation

@sgiehl
Copy link
Copy Markdown
Member

@sgiehl sgiehl commented Feb 26, 2026

Description

Enables PHPCS rules

  • SlevomatCodingStandard.Commenting.EmptyComment
  • SlevomatCodingStandard.Commenting.ForbiddenComments
    Restricted to disallow Constructor. comments

Note: PHPCS currently replaces those Constructor. comments with an empty line. This might cause multiple empty comment lines, which isn't nice as well. But we can use a different rule to enforce proper spacing in comments later.

Checklist

  • [NA] I have understood, reviewed, and tested all AI outputs before use
  • [NA] All AI instructions respect security, IP, and privacy rules

Review

@sgiehl sgiehl added this to the 5.8.0 milestone Feb 26, 2026
@sgiehl sgiehl requested a review from a team February 26, 2026 12:28
@sgiehl sgiehl added c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Technical debt Issues the will help to reduce technical debt labels Feb 26, 2026
@sgiehl sgiehl modified the milestones: 5.8.0, 5.9.0 Feb 26, 2026
@sgiehl sgiehl merged commit a009962 into 5.x-dev Feb 26, 2026
51 of 53 checks passed
@sgiehl sgiehl deleted the useless-comments branch February 26, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Technical debt Issues the will help to reduce technical debt

Development

Successfully merging this pull request may close these issues.

2 participants