includes:
	- config.level3.neon

rules:
	- PHPStan\Rules\Arrays\DeadForeachRule
	- PHPStan\Rules\Comparison\BooleanAndConstantConditionRule
	- PHPStan\Rules\Comparison\BooleanNotConstantConditionRule
	- PHPStan\Rules\Comparison\BooleanOrConstantConditionRule
	- PHPStan\Rules\Comparison\ElseIfConstantConditionRule
	- PHPStan\Rules\Comparison\IfConstantConditionRule
	- PHPStan\Rules\Comparison\TernaryOperatorConstantConditionRule
	- PHPStan\Rules\Comparison\UnreachableIfBranchesRule
	- PHPStan\Rules\Comparison\UnreachableTernaryElseBranchRule

parameters:
	featureToggles:
		deadCatchesRule: false
		noopRule: false
		tooWideTypehints: false
		unreachableStatement: false

conditionalTags:
	PHPStan\Rules\Exceptions\DeadCatchRule:
		phpstan.rules.rule: %featureToggles.deadCatchesRule%
	PHPStan\Rules\DeadCode\NoopRule:
		phpstan.rules.rule: %featureToggles.noopRule%
	PHPStan\Rules\DeadCode\UnreachableStatementRule:
		phpstan.rules.rule: %featureToggles.unreachableStatement%
	PHPStan\Rules\TooWideTypehints\TooWideClosureReturnTypehintRule:
		phpstan.rules.rule: %featureToggles.tooWideTypehints%
	PHPStan\Rules\TooWideTypehints\TooWideFunctionReturnTypehintRule:
		phpstan.rules.rule: %featureToggles.tooWideTypehints%
	PHPStan\Rules\TooWideTypehints\TooWidePrivateMethodReturnTypehintRule:
		phpstan.rules.rule: %featureToggles.tooWideTypehints%

services:
	-
		class: PHPStan\Rules\Classes\ImpossibleInstanceOfRule
		arguments:
			checkAlwaysTrueInstanceof: %checkAlwaysTrueInstanceof%
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\ImpossibleCheckTypeFunctionCallRule
		arguments:
			checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\ImpossibleCheckTypeMethodCallRule
		arguments:
			checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\ImpossibleCheckTypeStaticMethodCallRule
		arguments:
			checkAlwaysTrueCheckTypeFunctionCall: %checkAlwaysTrueCheckTypeFunctionCall%
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Comparison\StrictComparisonOfDifferentTypesRule
		arguments:
			checkAlwaysTrueStrictComparison: %checkAlwaysTrueStrictComparison%
		tags:
			- phpstan.rules.rule

	-
		class: PHPStan\Rules\Exceptions\DeadCatchRule

	-
		class: PHPStan\Rules\DeadCode\NoopRule

	-
		class: PHPStan\Rules\DeadCode\UnreachableStatementRule

	-
		class: PHPStan\Rules\TooWideTypehints\TooWideClosureReturnTypehintRule

	-
		class: PHPStan\Rules\TooWideTypehints\TooWideFunctionReturnTypehintRule

	-
		class: PHPStan\Rules\TooWideTypehints\TooWidePrivateMethodReturnTypehintRule
