<?xml version="1.0"?>
<ruleset name="PHPStan">
	<rule ref="vendor/consistence/coding-standard/Consistence/ruleset.xml">
		<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat"/>
		<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/>
		<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
		<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"/>
		<exclude name="Consistence.Exceptions.ExceptionDeclaration"/>
		<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag"/>
		<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoMatch"/>
	</rule>
	<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
		<properties>
			<property name="caseSensitive" value="false"/>
		</properties>
	</rule>
	<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
		<properties>
			<property name="newlinesCountBetweenOpenTagAndDeclare" value="0"/>
		</properties>
	</rule>
	<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
		<properties>
			<property name="usefulAnnotations" type="array" value="
				@dataProvider,
				@requires
			"/>
			<property name="enableObjectTypeHint" value="false"/>
		</properties>
		<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"/>
		<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"/>
	</rule>
	<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure.UnusedInheritedVariable">
		<exclude-pattern>src/Command/CommandHelper.php</exclude-pattern>
	</rule>
	<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
	<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/>
	<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
	<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
	<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
	<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
	<rule ref="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator"/>
	<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
		<properties>
			<property name="rootNamespaces" type="array" value="src=>PHPStan,tests/PHPStan=>PHPStan"/>
		</properties>
	</rule>
	<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
	<rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
	<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
	<rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/>
	<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration"/>
	<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing"/>
	<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
	<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
	<!--<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"/>-->
	<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
	<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
	<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
	<rule ref="SlevomatCodingStandard.PHP.UselessParentheses"/>
	<rule ref="Squiz.WhiteSpace.FunctionSpacing">
		<properties>
			<property name="spacing" value="1" />
			<property name="spacingBeforeFirst" value="1"/>
			<property name="spacingAfterLast" value="1"/>
		</properties>
	</rule>
	<exclude-pattern>tests/*/data</exclude-pattern>
	<exclude-pattern>tests/*/traits</exclude-pattern>
	<exclude-pattern>tests/notAutoloaded</exclude-pattern>
	<exclude-pattern>src/Reflection/SignatureMap/functionMap.php</exclude-pattern>
</ruleset>
