<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Features Plugin">

	<rule ref="WordPress-Core">
		<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
		<exclude name="Generic.Commenting.DocComment.MissingShort" />
		<exclude name="WordPress.PHP.DisallowShortTernary" />
	</rule>

	<rule ref="WordPress-Docs">
		<exclude-pattern>tests/*</exclude-pattern>
	</rule>
	<rule ref="WordPress-Extra" />

	<rule ref="WordPress.WP.I18n">
		<properties>
			<property name="text_domain" type="array">
				<element value="delete-control-by-firework"/>
				<element value="default"/>
			</property>
		</properties>
	</rule>

	<rule ref="WordPress-VIP-Go">
		<exclude-pattern>tests/*</exclude-pattern>
		<exclude-pattern>bin/*</exclude-pattern>
		<exclude-pattern>docs/*</exclude-pattern>

		<!-- This is not theme code -->
		<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules" />

		<!-- This is not a WordPress.com VIP environment -->
		<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get" />
		<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.get_page_by_path_get_page_by_path" />
		<exclude name="WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown" />
	</rule>

	<rule ref="WordPress.Files.FileName.InvalidClassFileName">
		<exclude-pattern>tests/*</exclude-pattern>
	</rule>

	<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited">
		<exclude-pattern>tests/*</exclude-pattern>
	</rule>

	<!-- Limit max. consecutive blank lines to 1 instead of 2. -->
	<rule ref="Squiz.WhiteSpace.FunctionSpacing">
		<properties>
			<property name="spacing" value="1"/>
			<property name="spacingBeforeFirst" value="1"/>
			<property name="spacingAfterLast" value="0"/>
		</properties>
	</rule>

	<arg value="s"/>
	<arg name="extensions" value="php"/>
	<file>.</file>

	<!-- Strip the filepaths down to the relevant bit. -->
	<arg name="basepath" value="./"/>

	<!-- Check up to 20 files simultaneously. -->
	<arg name="parallel" value="20"/>

	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>
	<exclude-pattern type="relative">^build/*</exclude-pattern>
	<exclude-pattern type="relative">^logs/*</exclude-pattern>
	<exclude-pattern>/assets/build/js/*.asset.php</exclude-pattern>
	<exclude-pattern>*/.github/*</exclude-pattern>
	<exclude-pattern>*/.lando/*</exclude-pattern>
    <exclude-pattern>webpack.config.js</exclude-pattern>

	<!-- Exclude wordpress dir if using Lando -->
	<exclude-pattern>/wordpress/*</exclude-pattern>

</ruleset>
