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

PHPDoc Usage #6

Open
gondwanasoft opened this issue Feb 11, 2018 · 0 comments
Open

PHPDoc Usage #6

gondwanasoft opened this issue Feb 11, 2018 · 0 comments

Comments

@gondwanasoft
Copy link
Contributor

gondwanasoft commented Feb 11, 2018

Adopt a minimum standard for PHPDoc and other source code comments, including:

  1. circumstances in which a method may fail and the consequences of this
  2. method preconditions; eg, ‘Method x() must have been called’; ‘Global variable y must have been initialised’
  3. necessary post-conditions; eg, ‘After calling this method, you must free z’
  4. all possible return values and types (‘mixed’ is unacceptable) for the method—including error conditions
  5. all possible exceptions thrown by the method, including those thrown by lower-level methods that aren’t caught
  6. if method is deprecated, notes on what to use instead.

This should be mandatory for public and protected methods, and strongly encouraged for private methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant