PHP 7.4 | Classes/NewTypedProperties: add XML documentation#2001
PHP 7.4 | Classes/NewTypedProperties: add XML documentation#2001jrfnl merged 3 commits intoPHPCompatibility:developfrom
Conversation
jrfnl
left a comment
There was a problem hiding this comment.
Thanks for this PR @okkun-sh !
Questions
- Should this include version-specific details (PHP 8.0+ types like mixed, union, etc.)?
The sniff has detailed version info in code comments, but I kept it simple for now.
Good question and one I find difficult to find an answer to as well.
If I compare it to a similar sniff which already has docs - PHPCompatibility.Classes.NewTypedConstants, the docs for both sniffs follow the same approach, however, there have not been any new "types" introduced in PHP since the introduction of typed constants, while for typed properties that's a different matter.
I've left a suggestion inline on how this could possibly be addressed. Keep in mind, this is only a suggestion, feel free to let it inspire you to a better version than my suggestion.
I'm working through the list in #1285, picking sniffs that seem feasible to document. Please let me know if there are any concerns with this approach.
No concerns, just appreciation ;-)
If/when more people would start actively contributing to the action items from #1285, it would help to "claim" some sniffs in advance (by leaving a comment on the ticket) to prevent multiple people accidentally working on docs for the same sniffs, but as you are currently the only one actively picking up action items from #1285, I think the risk of that happening at this moment is very small.
Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
|
@jrfnl If more people start contributing, I'll leave a comment. |
Summary
Add XML documentation for the Classes/NewTypedProperties sniff.
This contributes to #1285.
I'm working through the list in #1285, picking sniffs that seem feasible to document.
Please let me know if there are any concerns with this approach.
Questions
The sniff has detailed version info in code comments, but I kept it simple for now.