phpstan-strict-rules icon indicating copy to clipboard operation
phpstan-strict-rules copied to clipboard

Configuration parameters to enable/disable rules

Open MartinMystikJonas opened this issue 1 year ago • 2 comments

MartinMystikJonas avatar Jul 27 '22 16:07 MartinMystikJonas

I'd also like to change some parameters names, parameters.strictRules.booleansInConditions is obvious, but parameters.strictRules.methods doesn't tell me anything, it sounds like with strict rules, you wouldn't be able to use methods at all ;)

Should I come with better names suggestions or do you have some in mind? I drafted it based on namespaces but I agree then it could be more descriptive.

MartinMystikJonas avatar Aug 06 '22 13:08 MartinMystikJonas

I have updated configuration options names. Let me know if you want any of them changed.

parameters:
	strictRules:
		allRules: false
		booleansInConditions: false
		uselessCast: false
		requireParentConstructorCall: false
		disallowedConstructs: false
		overwriteVariablesWithLoop: false
		closureUsesThis: false
		matchingInheritedMethodNames: false
		numericOperandsInArithmeticOperators: false
		strictCalls: false
		switchConditionsMatchingType: false
		noVariableVariables: false

MartinMystikJonas avatar Aug 07 '22 22:08 MartinMystikJonas

Perfect! Thank you very much.

ondrejmirtes avatar Aug 23 '22 15:08 ondrejmirtes

I've simplified the readme: https://github.com/phpstan/phpstan-strict-rules/commit/8019e79968be592bd9b09b18f279d1834b697571

ondrejmirtes avatar Aug 23 '22 15:08 ondrejmirtes