configs/phpcs.xml
<?xml version="1.0" encoding="UTF-8"?>
<ruleset>
<description>PHP CodeSniffer ruleset for Drupal.</description>
<!-- JS/CSS files don't have to comply with PHP coding standards. -->
<exclude-pattern>*.css</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<rule ref="./vendor/drupal/coder/coder_sniffer/Drupal"/>
<rule ref="./vendor/drupal/coder/coder_sniffer/DrupalPractice"/>
<!-- PSR-12 sniffs -->
<rule ref="PSR12.Files.DeclareStatement"/>
</ruleset>