A custom PHP CodeSniffer ruleset
- Add the repository to your composer.json:
"repositories": [ { "type": "github", "url": "git@github.com:reelivate/php-coding-standards.git" } ]
- Require with composer:
composer require --dev reelivate/php-coding-standards
- Reference the ruleset in your
phpcs.xmlor.phpcs.xmlconfiguration file:<?xml version="1.0"?> <ruleset> <file>./src</file> <file>./tests</file> <rule ref="./vendor/reelivate/php-coding-standards/ruleset.xml"/> </ruleset>
- Run
phpcs