<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin">
	<description>Generally-applicable sniffs for WordPress plugins.</description>

	<!-- What to scan -->
	<file>.</file>
	<exclude-pattern>/tests/</exclude-pattern>
	<exclude-pattern>/vendor/</exclude-pattern>

	<!-- How to scan -->
	<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
	<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
	<arg value="sp"/>
	<arg name="colors"/>
	<arg name="warning-severity" value="0"/>
	<arg name="basepath" value="./"/>
	<arg name="extensions" value="php"/>
	<arg name="parallel" value="8"/>

	<!-- Rules: Check PHP version compatibility -->
	<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
	<config name="testVersion" value="5.6-7.2"/>
	<rule ref="PHPCompatibilityWP"/>

	<!-- Rules: WordPress Coding Standards -->
	<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
	<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
	<config name="minimum_supported_wp_version" value="4.6"/>

	<rule ref="WordPress">
		<exclude name="WordPress.VIP"/>

		<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found" />
		<exclude name="Generic.Files.LowercasedFilename.NotFound" />

		<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
		<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
		<exclude name="WordPress.Classes.ClassInstantiation.MissingParenthesis" />
		<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeKeyFound" />

		<exclude name="Squiz.Commenting.FileComment.Missing" />
		<exclude name="Squiz.Commenting.ClassComment.Missing" />
		<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows" />
		<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
		<exclude name="Squiz.Commenting.FunctionCommentThrowTag.Missing" />

		<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
		<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
		<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
	</rule>
</ruleset>
