-
-
Notifications
You must be signed in to change notification settings - Fork 862
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
Multiline array documentation phpdoc support #2497
Comments
@JanTvrdik, who is the author of the brilliant phpdoc-parser, does not find this feasible. |
I'm not sure why it's not feasible — Psalm does it without incident. As Ondrej has pointed out, it's less efficient to use arrays instead of objects, but that's a separate issue. |
@muglug yup, I'm receiving array from JSON RPC API and converting it to object, but I was thinking documenting its shape would be good idea 🤔 The problem with single line shape documentation is that it fits to 2 4K screens minimum and new issues arise (like IDE tries to wrap it to multiple lines when autoformatting, violation of max line length sniff etc.) @ondrejmirtes maybe we can move this issue to phpdoc-parser repo, did not know it existed at the time of creating this. |
Implemented: phpstan/phpdoc-parser#33 |
Multiline array structure documentation is currently not possible but seems handy for wide arrays.
https://phpstan.org/r/7e3b0b6d-e264-4f31-b70c-1beefac23a8b
Not sure whether phpstan thing though.
The text was updated successfully, but these errors were encountered: