Skip to content

Standardize coding style in sniff XML documentation code examples #1132

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
rodrigoprimo opened this issue Jun 13, 2025 · 1 comment
Open

Comments

@rodrigoprimo
Copy link
Contributor

As discussed in #1108 (comment), currently, there is no established coding style for code examples in the sniff XML documentation files. This has led to inconsistencies in how code examples are formatted across different XML docs.

I'm not sure what the best approach is, but I do think we should have one.

Some options for consideration:

@jrfnl
Copy link
Member

jrfnl commented Jun 14, 2025

Use the PHPCS coding style.

Not so sure about that as the PHPCS coding style is quite custom. I think PSR12 might be more appropriate in that case.

Having said that, I agree it would be nice to set some standard, but only if we can also safeguard it - which may be difficult for the "invalid" code samples.

All in all, low priority.

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

No branches or pull requests

2 participants