This standard requires phpcs version 3. It does not work with version 2.
This standard can be installed with the Composer dependency manager.
-
Install the coding standard as a dependency of your project
composer require --dev A5sys/A5sys-coding-standard
-
Add the coding standard to the PHP_CodeSniffer install path
vendor/bin/phpcs --config-set installed_paths vendor/A5sys/A5sys-coding-standard
-
Check the installed coding standards for "A5sys"
vendor/bin/phpcs -i
-
Done!
vendor/bin/phpcs /path/to/code
### Stand-alone
-
Install PHP_CodeSniffer
-
Checkout this repository
git clone git://github.com/A5sys/A5sys-coding-standard.git
-
Add the coding standard to the PHP_CodeSniffer install path
phpcs --config-set installed_paths /path/to/A5sys-coding-standards
Or copy/symlink this repository's "A5sys"-folder inside the phpcs
Standards
directory -
Check the installed coding standards for "A5sys"
phpcs -i
-
Done!
phpcs /path/to/code