The PHP coding standard of the my projects.
This project is PHP_CodeSniffer rules. It also contains the rules of the Slevomat Coding Standard.
Standards can be installed with the Composer dependency manager.
composer require --dev blue32a/php-coding-standard
Make sure that the installed coding standards include Blue32a.
phpcs -i
phpcs --standard=Blue32a example.php
If you need to further customize the selection of sniffs for your project - you can create a custom ruleset file.
<?xml version="1.0"?>
<ruleset name="MyStandard">
<rule ref="Blue32a"/>
</ruleset>