laminas/laminas-coding-standard

Clarify documentation about optional param and return tags in docblock

Closed this issue · 1 comments

Currently documentation mentions phpDoc tags @param and @return as being optional and in some cases undesirable. However it is done briefly and in a way that is easy to gloss over unless you already know what you are looking for.

https://github.com/laminas/laminas-coding-standard/blob/3c4bc41512e8e8577765c18ab66e6b9a3467ed20/docs/book/v2/coding-style-guide.md#9-commenting-and-docblocks

Code SHOULD be written so it explains itself. DocBlocks and comments SHOULD only be used if necessary. They MUST NOT start with # and MUST NOT be empty. They SHOULD NOT be used for already typehinted arguments, except arrays.

I believe it is fairly significant rule and should be elevated to its own block that also includes code example.

Fixed in #45