Difference between revisions of "Code Validation"
From GLMWiki
(New page: == Code Documentation == Please install and use PEAR's [http://pear.php.net/package/PHP_CodeSniffer PHP_CodeSniffer] to assist you with your coding standards validation. ''PHP_CodeSniff...) |
(→Configuration Standards for PHP_CodeSniffers) |
||
Line 7: | Line 7: | ||
=== Configuration Standards for PHP_CodeSniffers === | === Configuration Standards for PHP_CodeSniffers === | ||
− | |||
* Set tab width to 4 spaces | * Set tab width to 4 spaces | ||
<tt>phpcs --config-set tab_width 4</tt> | <tt>phpcs --config-set tab_width 4</tt> |
Latest revision as of 08:41, 11 October 2019
Code Documentation
Please install and use PEAR's PHP_CodeSniffer to assist you with your coding standards validation.
PHP_CodeSniffer is a PHP5 script that tokenises and "sniffs" PHP and JavaScript code to detect violations of a defined coding standard. It is an essential development tool that ensures your code remains clean and consistent. It can also help prevent some common semantic errors made by developers.
Configuration Standards for PHP_CodeSniffers
- Set tab width to 4 spaces
phpcs --config-set tab_width 4