Skip to content

Commit

Permalink
Restrict rule behind feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cs278 committed Jan 14, 2020
1 parent f6ca8ee commit b49e211
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions conf/bleedingEdge.neon
@@ -0,0 +1,3 @@
parameters:
featureToggles:
randomIntParameters: true
1 change: 0 additions & 1 deletion conf/config.level0.neon
Expand Up @@ -27,7 +27,6 @@ rules:
- PHPStan\Rules\Functions\InnerFunctionRule
- PHPStan\Rules\Functions\NonExistentDefinedFunctionRule
- PHPStan\Rules\Functions\PrintfParametersRule
- PHPStan\Rules\Functions\RandomIntParametersRule
- PHPStan\Rules\Methods\ExistingClassesInTypehintsRule
- PHPStan\Rules\Properties\AccessPropertiesInAssignRule
- PHPStan\Rules\Properties\AccessStaticPropertiesInAssignRule
Expand Down
10 changes: 10 additions & 0 deletions conf/config.level5.neon
@@ -1,6 +1,16 @@
includes:
- config.level4.neon

conditionalTags:
PHPStan\Rules\Functions\RandomIntParametersRule:
phpstan.rules.rule: %featureToggles.randomIntParameters%

parameters:
checkFunctionArgumentTypes: true
checkArgumentsPassedByReference: true
featureToggles:
randomIntParameters: false

services:
-
class: PHPStan\Rules\Functions\RandomIntParametersRule

0 comments on commit b49e211

Please sign in to comment.