<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
	<description>Generally-applicable sniffs for WordPress plugins</description>

	<rule ref="WordPress-Core">
		<!-- Allow short array syntax [] -->
		<exclude name="Universal.Arrays.DisallowShortArraySyntax" />
		<exclude name="Squiz.Commenting.FileComment.Missing" />
		<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames" />
		<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
	</rule>
	<rule ref="WordPress-Docs">
		<!-- Parameter description is optional when name is self-explanatory -->
		<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
		<exclude name="Generic.Commenting.DocComment.ShortNotCapital" />
		<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
	</rule>
	<rule ref="WordPress-Extra">
		<!-- Allow PSR-0 file naming for autoloader -->
		<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
		<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
		<!-- Allow short ternary -->
		<exclude name="Universal.Operators.DisallowShortTernary" />
	</rule>

	<!-- Check all PHP files in directory tree by default. -->
	<arg name="extensions" value="php"/>
	<file>./hamelp.php</file>
	<file>./app</file>

	<!-- Show progress and sniff codes in all reports -->
	<arg value="ps"/>
	<arg name="colors"/>

	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>
	<exclude-pattern>*/tests/*</exclude-pattern>
</ruleset>
