Skip to content
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

Clarify documentation about optional param and return tags in docblock #33

Closed
Xerkus opened this issue Jun 29, 2020 · 1 comment · Fixed by #45
Closed

Clarify documentation about optional param and return tags in docblock #33

Xerkus opened this issue Jun 29, 2020 · 1 comment · Fixed by #45
Assignees
Milestone

Comments

@Xerkus
Copy link
Member

Xerkus commented Jun 29, 2020

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.

@geerteltink
Copy link
Member

Fixed in #45

@geerteltink geerteltink added this to the 2.1.1 milestone Oct 24, 2020
@geerteltink geerteltink self-assigned this Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants