<?xml version="1.0"?>
<ruleset name="ForceField">
	
	<!-- Based on 10up-Default Rulset -->
	<!-- https://raw.githubusercontent.com/10up/phpcs-composer/master/10up-Default/ruleset.xml -->
	
	<description>A Ruleset for checking ForceField plugin.</description>

	<exclude-pattern>*/phpunit.xml*</exclude-pattern>
	<exclude-pattern>*/tests/*</exclude-pattern>
	<exclude-pattern>*\.(css|js)</exclude-pattern>

	<rule ref="Internal.NoCodeFound">
		<severity>0</severity>
	</rule>

	<rule ref="Internal.LineEndings.Mixed">
		<severity>0</severity>
	</rule>

	<rule ref="Internal.Tokenizer.Exception">
		<severity>0</severity>
	</rule>

	<config name="ignore_warnings_on_exit" value="1"/>

	<rule ref="WordPress-Extra">

		<!-- General Rules -->
		<exclude name="WordPress.Files.FileName"/>
		<exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace"/>
		<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
		<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/>
		<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
		<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
		<exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop"/>
		<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/>
		<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/>

		<!-- Strict Comparisons -->
		<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
		<exclude name="WordPress.PHP.StrictComparisons.LooseComparison"/>

		<!-- Overzealous Rules -->
		<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
		<exclude name="Generic.Files.LineLength.TooLong"/>
		<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/>
		<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceBeforeClose"/>
		<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceAfterOpen"/>
		<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine"/>
		<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound"/>
		<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys"/>
		<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/>
		<exclude name="WordPress.Arrays.ArrayIndentation.MultiLineArrayItemNotAligned"/>
		<exclude name="WordPress.Arrays.ArrayIndentation.ItemNotAligned"/>
		<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
		<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
		<exclude name="Squiz.ControlStructures.ControlSignature.SpaceBeforeOpenBrace"/>
		<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/>

		<!-- Whitespace and Tab Warnings -->
		<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd"/>
		<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore"/>
		<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter"/>
		<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed"/>
		<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
		<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
		<exclude name="PEAR.WhiteSpace.ScopeIndent.Incorrect"/>
		<exclude name="WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed"/>
		<exclude name="WordPress.WhiteSpace.PrecisionAlignment.Found"/>
		<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen"/>
		<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"/>

	</rule>

	<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
		<type>warning</type>
	</rule>
	<rule ref="WordPress.WP.GlobalVariablesOverride.OverrideProhibited">
		<type>warning</type>
	</rule>

	<rule ref="Generic.Formatting.DisallowMultipleStatements.SameLine">
		<type>warning</type>
	</rule>
	<rule ref="WordPress.DB.PreparedSQL.NotPrepared">
		<type>warning</type>
	</rule>
	<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
		<type>warning</type>
	</rule>
	<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
		<type>warning</type>
	</rule>
	<rule ref="WordPress.Security.EscapeOutput.OutputNotEscaped">
		<type>warning</type>
	</rule>

	<!-- <rule ref="PHPCompatibilityWP" /> -->

</ruleset>
