You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
Not only for the "invalid" code samples, but also for the "valid" code samples, if a particular sniff enforces a rule that goes against the standard that gets chosen.
Activity
jrfnl commentedon Jun 14, 2025
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.
rodrigoprimo commentedon Jun 17, 2025
Not only for the "invalid" code samples, but also for the "valid" code samples, if a particular sniff enforces a rule that goes against the standard that gets chosen.