PHP_CodeSnifferのカスタムルールを作ってみた
composer req naopusyu/phpcs-custom-rules --dev
Create phpcs.xml
file.
<?xml version="1.0"?>
<ruleset>
<arg name="colors" />
<arg value="ps" />
<rule ref="vendor/naopusyu/phpcs-custom-rules/src/PHPCSCustomRules/ruleset.xml"/>
</ruleset>
Then run the phpcs command.
vendor/bin/phpcs src