A PHP coding standard for Unleashed Technologies, originally based on djoos/Symfony-coding-standard.
This standard can be installed with the Composer dependency manager.
-
Install the coding standard as a dependency of your project
composer require --dev unleashedtech/php-coding-standard -
Add the coding standard to the PHP_CodeSniffer install path
vendor/bin/phpcs --config-set installed_paths vendor/unleashedtech/php-coding-standard -
Check the installed coding standards for "Unleashed"
vendor/bin/phpcs -i -
Done!
vendor/bin/phpcs /path/to/code
-
Install PHP_CodeSniffer
-
Checkout this repository
git clone git://github.com/unleashedtech/php-coding-standard.git -
Add the coding standard to the PHP_CodeSniffer install path
phpcs --config-set installed_paths /path/to/php-coding-standardOr copy/symlink this repository's "Unleashed"-folder inside the phpcs
Standardsdirectory -
Check the installed coding standards for "Unleashed"
phpcs -i -
Done!
phpcs /path/to/code