-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add short description for an array that has a described hash #30
Comments
I have an update ready locally, just not found the time to finish it |
👍 for array hash documentation |
To re-post the idea from the other thread: /**
* @param {
* type: string
* query: SelectInterface
* This is the query object.
* options: {
* color: string = 'blue'
* }
* }[] $items
* And now a description about the entire param.
* @param $options {
* # Or maybe put a description like this?
* color: string
* The colors of PDO.
* }
* @param string $label
* This param adds a label.
*/ I somehow don't like the @type all over the place. One @param should be enough for my taste, then the nested stuff should follow a simpler syntax. How exactly this looks like is a matter of discussion, I personally prefer sth around yml or json style. |
Here you describe values but what about keys? if I need return structured array like:
and I want to describe key and value? |
@66Ton99 for the example you offer you would not need an elaborate piece because you don't have fixed keys; the following would suffice:
|
I am going to close this issue as it is basically a duplicate of #7; let's continue there |
* Rename Exception to ClientException * typo
In the current PHPDoc standards, describing hashes does not afford for giving a short description to an array element in conjunction with the hash details.
Currently:
As @mvriel has been working with us (the WordPress inline documentation team) on this, we've come up with the standard of putting the description inside the container block for describing hash elements, a la:
The text was updated successfully, but these errors were encountered: