Coding standards & style guide - php-tuf/composer-stager GitHub Wiki
Coding standards
Composer Stager uses PHP_CodeSniffer (PHPCS) (phpcs.xml.dist
) to automatically enforce as many coding standards as possible.
See also Automated testing & static analysis.
Style guide
Other standards cannot realistically be enforced by automated tools because they involve human judgment:
- Docblock annotation descriptions, e.g.,
@parameter
and@return
, should be the same wherever they appear with the same meaning. For example,@param int $timeout
should have the same description on every function that takes it. - Exception messages should not end with a period (
.
).