Skip to content

Commit

Permalink
Update phpcs.xml.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Jul 15, 2023
1 parent 5d1b3dd commit 70a5d7b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
<exclude-pattern>*/\.codeception/*</exclude-pattern>
<exclude-pattern>*/\.github/*</exclude-pattern>
<exclude-pattern>*/\.wordpress-org/*</exclude-pattern>
<exclude-pattern>*/\.yarn/*</exclude-pattern>
<exclude-pattern>*/assets/*</exclude-pattern>
<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/coverage/*</exclude-pattern>
<exclude-pattern>*/languages/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/src/js/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>

<!-- How to scan -->
Expand All @@ -20,6 +23,7 @@
<arg name="parallel" value="12"/><!-- Enables parallel processing when available for faster results. -->

<config name="installed_paths" value="vendor/phpcompatibility/php-compatibility,vendor/phpcompatibility/phpcompatibility-paragonie,vendor/phpcompatibility/phpcompatibility-wp,vendor/wp-coding-standards/wpcs"/>
<config name="testVersion" value="5.6-"/>

<!-- Rules: Check PHP version compatibility -->
<rule ref="PHPCompatibility"/>
Expand All @@ -29,16 +33,22 @@
<config name="minimum_supported_wp_version" value="4.4"/>
<rule ref="WordPress"/>

<!-- Allow only short array syntax -->
<rule ref="Generic.Arrays.DisallowShortArraySyntax.Found">
<severity>0</severity>
</rule>
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>

<!-- Allow short ternary syntax -->
<rule ref="WordPress.PHP.DisallowShortTernary.Found">
<severity>0</severity>
</rule>

<!-- Rules to follow PSR4 -->
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<severity>0</severity>
</rule>
<rule ref="WordPress.PHP.DisallowShortTernary.Found">
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<severity>0</severity>
</rule>
</ruleset>

0 comments on commit 70a5d7b

Please sign in to comment.