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

Core: add new sniff to check formatting of OO declaration statement #2255

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jun 19, 2023

See #2254 for a detailed discussion of all options considered.

Fixes #2254

See 2254 for a detailed discussion of all options considered.

Fixes 2254
@jrfnl jrfnl force-pushed the feature/core-add-oo-declaration-check branch from 11bb652 to 619173b Compare June 19, 2023 19:00
Copy link
Member

@GaryJones GaryJones left a comment

Choose a reason for hiding this comment

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

@dingo-d dingo-d merged commit fa01dd7 into develop Jun 20, 2023
@dingo-d dingo-d deleted the feature/core-add-oo-declaration-check branch June 20, 2023 08:17
@jrfnl
Copy link
Member Author

jrfnl commented Jun 23, 2023

FYI: when running this sniff over WP Core, I noticed that the fixer for the "no blank lines between class body and close brace" check also removed indentation. Not a biggie as when running with the complete WPCS ruleset, that gets fixed again via the ScopeIndent sniff.

All the same, I have submitted a fix to PHPCS to prevent this issue: squizlabs/PHP_CodeSniffer#3846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing: OO declaration statement formatting rules
3 participants