Skip to content

Commit

Permalink
Enable ArrayFilterRule only with bleedingEdge
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Mar 18, 2022
1 parent 204cc2b commit 7627b52
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions conf/bleedingEdge.neon
Expand Up @@ -3,5 +3,6 @@ parameters:
bleedingEdge: true
skipCheckGenericClasses: []
explicitMixedInUnknownGenericNew: true
arrayFilter: true
stubFiles:
- ../stubs/bleedingEdge/Countable.stub
8 changes: 7 additions & 1 deletion conf/config.level5.neon
Expand Up @@ -5,10 +5,13 @@ parameters:
checkFunctionArgumentTypes: true
checkArgumentsPassedByReference: true

conditionalTags:
PHPStan\Rules\Functions\ArrayFilterRule:
phpstan.rules.rule: %featureToggles.arrayFilter%

rules:
- PHPStan\Rules\DateTimeInstantiationRule
- PHPStan\Rules\Functions\ImplodeFunctionRule
- PHPStan\Rules\Functions\ArrayFilterRule

services:
-
Expand All @@ -17,3 +20,6 @@ services:
reportMaybes: %reportMaybes%
tags:
- phpstan.rules.rule

-
class: PHPStan\Rules\Functions\ArrayFilterRule
2 changes: 2 additions & 0 deletions conf/config.neon
Expand Up @@ -28,6 +28,7 @@ parameters:
- FilterIterator
- RecursiveCallbackFilterIterator
explicitMixedInUnknownGenericNew: false
arrayFilter: false
fileExtensions:
- php
checkAdvancedIsset: false
Expand Down Expand Up @@ -205,6 +206,7 @@ parametersSchema:
disableRuntimeReflectionProvider: bool(),
skipCheckGenericClasses: listOf(string()),
explicitMixedInUnknownGenericNew: bool(),
arrayFilter: bool(),
])
fileExtensions: listOf(string())
checkAdvancedIsset: bool()
Expand Down

0 comments on commit 7627b52

Please sign in to comment.