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

	<file>./app/Hametuha/</file>
	<file>./wp-hamazon.php</file>
	<file>./templates/</file>
	<file>./template-parts/</file>

	<arg name="colors" />
	<arg value="ps" />

	<rule ref="WordPress-Core">
		<exclude name="Generic.Files.LowercasedFilename" />
		<exclude name="Generic.Commenting.DocComment.ShortNotCapital" />
		<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
		<exclude name="WordPress.Files.FileName" />
		<exclude name="Squiz.Commenting.FileComment" />
		<exclude name="Squiz.PHP.CommentedOutCode" />
		<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found" />
		<exclude name="Squiz.Commenting.VariableComment.Missing" />
		<exclude name="Squiz.Commenting.LongConditionClosingComment.Missing" />
		<exclude name="WordPress.WP.I18n.SingleUnderscoreGetTextFunction" />
		<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
		<exclude name="WordPress.PHP.DisallowShortTernary.Found" />
		<exclude name="Universal.Operators.DisallowShortTernary.Found" />
		<exclude name="WordPress.DateTime.CurrentTimeTimestamp.RequestedUTC" />
		<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
		<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
		<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
		<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
		<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments"/>
		<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound" />
		<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase" />
	</rule>

	<!-- PHPCompatibility disabled due to compatibility issues with PHP 8.x
	     TODO: Re-enable when PHPCompatibility supports PHP 8.x properly
	<rule ref="PHPCompatibility">
		<config name="testVersion" value="7.4-"/>
	</rule>
	-->

	<exclude-pattern>/bin/*.php</exclude-pattern>
	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*.js</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>
	<exclude-pattern>*/wordpress/*</exclude-pattern>
	<exclude-pattern>*/tests/*</exclude-pattern>
	<exclude-pattern>*/app/Amazon/*</exclude-pattern>
</ruleset>
