Skip to content

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
@rodrigoprimo rodrigoprimo deleted the fix-valid-function-name-doc branch July 22, 2025 16:32
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