Skip to content

NamingConventions/ValidFunctionName: update XML documentation #2531

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

Merged
merged 2 commits into from
Jun 23, 2025

Conversation

rodrigoprimo
Copy link
Collaborator

This PR implements the following changes to the XML documentation of the WordPress.NamingConventions.ValidFunctionName sniff:

  • Fix syntax errors in two code examples that I found while testing a script to detect issues in the code examples.
  • Add a code example for the error generated by the sniff when a function/method starts with double underscores.

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.

Nice finds @rodrigoprimo ! LGTM.

Once PR #2532 has been merged, this can be rebased and merged.

…e examples

This commit fixes two code examples in the XML doc for the `WordPress.NamingConventions.ValidFunctionName` sniff that were missing the `function` keyword when declaring a method.
…rscore prefix

This is one of the errors that the sniff generates, it was mentioned in the XML documentation description, but there was no <code_comparison> block for it.
@rodrigoprimo rodrigoprimo force-pushed the fix-valid-function-name-doc branch from afbe218 to 9c8606e Compare June 23, 2025 15:05
@rodrigoprimo
Copy link
Collaborator Author

Rebased without changes to get a passing build.

@jrfnl
Copy link
Member

jrfnl commented Jun 23, 2025

Thanks for that @rodrigoprimo ! I'll merge it now.

@jrfnl jrfnl merged commit 8189aff into WordPress:develop Jun 23, 2025
40 checks passed
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.

3 participants