This is a set of custom sniffs and ruleset which make up our VIA
coding standard.
We currently use PSR-2
as our base ruleset with minor whitespace changes to match our coding style and widen support for non-PHPFIG frameworks.
After installing the PHP CodeSniffer, you can create symlinks to each of the directories under Standards/
.
You can navigate to the default standards directory with the following commands:
cd `pear config-get php_dir`
cd PHP/CodeSniffer/Standards/
Within this directory are the default standards installed with PHP CodeSniffer. Add symlinks for each of the directories in our Standards/
. For example:
ln -s /path/to/cloned/coding-standards/php/phpcs/Standards/Via Via
To run PHP CodeSniffer using our standard, use the following command:
phpcs -ns --standard=Via path_or_file_to_check