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
chore: restore commenting sniffs to PHPCS ruleset #2976
chore: restore commenting sniffs to PHPCS ruleset #2976
Conversation
Co-authored-by: Jason Bahl <jasonbahl@mac.com>
src/Data/PostObjectMutation.php
Outdated
* delete) | ||
* @param \WPGraphQL\AppContext $context The AppContext passed down to all resolvers | ||
* @param int $post_id $post_id The ID of the postObject being | ||
* mutated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line looks weird too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷🏻♂️ maying it's just the Github UI that makes it look off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah these indeed got messed up. 1 sec will push a fix.
Code Climate has analyzed commit f21a3ec and detected 0 issues on this pull request. View more on Code Climate. |
What does this implement/fix? Explain your changes.
This PR restores the
Squiz.Commenting
PHPCS ruleset, and addresses the resulting smells.More specifically:
Squiz.Commenting.BlockComment
,Squiz.Commenting.DocCommenting.Alignment
,Squiz.FunctionComment.SpacingAfterParam
, andSquiz.Commenting.InlineComment.NoSpaceBefore
were autofixed.@var
tags,@params
and their types,@throws
tags.See additional comments for the remaining
Squiz.Commenting
smells that are now explicitly excluded.No production code has been changed in this PR
Does this close any currently open issues?
Any relevant logs, error output, GraphiQL screenshots, etc?
Any other comments?
Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction
has been removed from the ruleset as it is already included byWordPress
.Generic.Commenting.DocComment.MissingShort
has been reclassified as "Should probably be added back".Squiz.Commenting.FunctionComment.IncorrectTypeHint
throws false positives when used in conjunction with FCQN. which is significantly more important in terms of IDE hinting.Squiz.Commenting.ClassComment.Missing
,Squiz.Commenting.FileComment.Missing
. These don't affect IDE hinting, and a lot of effort to add.Squiz.Commenting.FunctionComment.EmptyThrows
,Squiz.Commenting.FunctionComment.MissingParamComment
. While adding param explanations would be nice, this would be a lot of work to remediate. Saving for a future PR.Squiz.Commenting.InlineComment.InvalidEndChar
, would be a lot of work to remediate for only formatting.Where has this been tested?
Operating System: Ubuntu 20.04 (wsl2 + devilbox + php8.1.15)
WordPress Version: 6.3.2