<?xml version="1.0"?>
<ruleset name="WP Responder">
	<description>WP Responder Coding Standards</description>

	<!-- Scan all files in directory -->
	<file>.</file>

	<exclude-pattern>*/assets/*</exclude-pattern>

	<!-- Exclude the Composer Vendor directory. -->
	<exclude-pattern>*/vendor/*</exclude-pattern>

	<!-- Exclude the Node Modules directory. -->
	<exclude-pattern>*/node_modules/*</exclude-pattern>

	<!-- Scan only PHP files -->
	<arg name="extensions" value="php"/>

	<!-- Show colors in console -->
	<arg value="-colors"/>

	<!-- Show progress in console -->
	<arg value="p"/>

	<!-- Show sniff codes in all reports -->
	<arg value="ns"/>

	<rule ref="WordPress"/>

	<!-- Check code for cross-version PHP compatibility. -->
	<config name="testVersion" value="8.1-"/>
	<rule ref="PHPCompatibilityWP">
		<!-- Exclude PHP constants back-filled by PHPCS. -->
		<exclude name="PHPCompatibility.Constants.NewConstants.t_finallyFound"/>
		<exclude name="PHPCompatibility.Constants.NewConstants.t_yieldFound"/>
		<exclude name="PHPCompatibility.Constants.NewConstants.t_ellipsisFound"/>
		<exclude name="PHPCompatibility.Constants.NewConstants.t_powFound"/>
		<exclude name="PHPCompatibility.Constants.NewConstants.t_pow_equalFound"/>
		<exclude name="PHPCompatibility.Constants.NewConstants.t_spaceshipFound"/>
		<exclude name="PHPCompatibility.Constants.NewConstants.t_coalesceFound"/>
		<exclude name="PHPCompatibility.Constants.NewConstants.t_coalesce_equalFound"/>
		<exclude name="PHPCompatibility.Constants.NewConstants.t_yield_fromFound"/>
	</rule>

	<!-- Add in some extra rules from other standards. -->
	<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
	<rule ref="Generic.Commenting.Todo"/>

	<config name="minimum_supported_wp_version" value="4.9"/>
</ruleset>
