Collection of PHP_CodeSniffer sniffs for CoCart.
composer require cocart-headless/cocart-sniffs
./vendor/bin/phpcs --standard=CoCart-Core <file>
PHPCS config file:
<?xml version="1.0"?>
<ruleset name="CoCart Coding Standards">
<description>My projects ruleset.</description>
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.4" />
<config name="testVersion" value="7.2-" />
<!-- Rules -->
<rule ref="CoCart-Core" />
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="new-text-domain" />
</properties>
</rule>
<rule ref="PHPCompatibility">
<exclude-pattern>tests/</exclude-pattern>
</rule>
</ruleset>