- Clone repository
- Install dependencies
composer install
- Configure standard:
{install-dir}/vendor/bin/phpcs --config-set default_standard BrainbitsCodingStandard
- Execute:
{install-dir}/vendor/bin/phpcs {src-dir}
- Add the standard to your project:
composer require brainbits/phpcs-standard
- Configure standard:
vendor/bin/phpcs --config-set default_standard BrainbitsCodingStandard
- Execute:
vendor/bin/phpcs {src-dir}
- Add the standard to your project:
composer require brainbits/phpcs-standard
- Create phpcs.xml (See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage)
- Include brainbits ruleset:
<rule ref="BrainbitsCodingStandard" />
- Add default src-dir:
<file>{src-dir}</file>
- Tweak to your needs, for example add rules or disable rules included in the brainbits standard.
- Include brainbits ruleset:
- Execute:
vendor/bin/phpcs
- docker run -it --rm -v $PWD:/app brainbits/phpcs-standard {src-dir}