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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

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.

…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.
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.

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