| 1 |
<?xml version="1.0"?> |
| 2 |
<ruleset name="Block Manager Coding Standards"> |
| 3 |
<arg name="extensions" value="php" /> |
| 4 |
<arg name="colors" /> |
| 5 |
<arg value="s" /><!-- Show sniff codes in all reports. --> |
| 6 |
<arg value="p" /><!-- Show progress. --> |
| 7 |
|
| 8 |
<!-- |
| 9 |
PHP 8.0 and higher. |
| 10 |
--> |
| 11 |
<config name="testVersion" value="8.0-" /> |
| 12 |
<rule ref="PHPCompatibilityWP" /> |
| 13 |
|
| 14 |
<rule ref="WordPress"> |
| 15 |
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" /> |
| 16 |
<exclude name="WordPress.PHP.YodaConditions.NotYoda" /> |
| 17 |
<exclude name="Universal.Operators.DisallowShortTernary.Found" /> |
| 18 |
<exclude name="WordPress.WP.AlternativeFunctions" /> |
| 19 |
|
| 20 |
<!-- Sometimes we use the PSR4 autoloading standard which conflicts with these rules. --> |
| 21 |
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" /> |
| 22 |
<exclude name="WordPress.Files.FileName.InvalidClassFileName" /> |
| 23 |
</rule> |
| 24 |
|
| 25 |
<!-- Allow . in hook names. --> |
| 26 |
<rule ref="WordPress.NamingConventions.ValidHookName"> |
| 27 |
<properties> |
| 28 |
<property name="additionalWordDelimiters" value="." /> |
| 29 |
</properties> |
| 30 |
</rule> |
| 31 |
|
| 32 |
<!-- Generic. --> |
| 33 |
|
| 34 |
<!-- Disallow long array syntax. --> |
| 35 |
<rule ref="Generic.Arrays.DisallowLongArraySyntax" /> |
| 36 |
|
| 37 |
<!-- Exclusions. --> |
| 38 |
|
| 39 |
<!-- Build tool config/scripts. --> |
| 40 |
<exclude-pattern>/node_modules/*</exclude-pattern> |
| 41 |
<exclude-pattern>/vendor/*</exclude-pattern> |
| 42 |
|
| 43 |
<!-- Other files and folders --> |
| 44 |
<exclude-pattern>/*.asset.php</exclude-pattern> |
| 45 |
<exclude-pattern>/db.php</exclude-pattern> |
| 46 |
<exclude-pattern>/index.php</exclude-pattern> |
| 47 |
<exclude-pattern>/uploads/*</exclude-pattern> |
| 48 |
<exclude-pattern>/images/*</exclude-pattern> |
| 49 |
<exclude-pattern>/languages/*</exclude-pattern> |
| 50 |
<exclude-pattern>/mu-plugins/*</exclude-pattern> |
| 51 |
</ruleset> |
| 52 |
|