Skip to content

Commit e47eee3

Browse files
committed
[BE] Report useless array_filter() calls
1 parent 29ddf42 commit e47eee3

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

changelog-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Major new features 🚀
2727
* Check vprintf/vsprintf arguments against placeholder count (level 0) ([#3126](https://github.com/phpstan/phpstan-src/pull/3126)), thanks @staabm!
2828
* Report useless return values of function calls like `var_export` without `$return=true` (level 0) ([#3225](https://github.com/phpstan/phpstan-src/pull/3225)), #11320, thanks @staabm!
2929
* Rule for `call_user_func()` (level 5) ([#2479](https://github.com/phpstan/phpstan-src/pull/2479)), thanks @staabm!
30+
* Report useless `array_filter()` calls (level 5) ([#1077](https://github.com/phpstan/phpstan-src/pull/1077)), #6840, thanks @leongersen!
3031
* Check if required file exists (level 0) ([#3294](https://github.com/phpstan/phpstan-src/pull/3294)), #3397, thanks @Bellangelo!
3132
* ConstantLooseComparisonRule - level 4 (https://github.com/phpstan/phpstan-src/commit/6ebf2361a3c831dd105a815521889428c295dc9f)
3233
* Check array functions which require stringish values (level 5) ([#3132](https://github.com/phpstan/phpstan-src/pull/3132)), #11141, #5848, #3694, #11111, thanks @schlndh!
@@ -64,7 +65,6 @@ Major new features 🚀
6465
Bleeding edge (TODO move to other sections)
6566
=====================
6667

67-
* Report useless `array_filter()` calls ([#1077](https://github.com/phpstan/phpstan-src/pull/1077)), #6840, thanks @leongersen!
6868
* Rules for checking direct calls to `__construct()` (level 2) ([#1208](https://github.com/phpstan/phpstan-src/pull/1208)), #7022, thanks @muno92!
6969
* Support `@readonly` property and `@immutable` class PHPDoc ([#1295](https://github.com/phpstan/phpstan-src/pull/1295), [#1335](https://github.com/phpstan/phpstan-src/pull/1335)), #4082, thanks @herndlm!
7070
* Move IllegalConstructorMethodCallRule and IllegalConstructorStaticCallRule to phpstan-strict-rules (https://github.com/phpstan/phpstan-src/commit/124b30f98c182193187be0b9c2e151e477429b7a, https://github.com/phpstan/phpstan-strict-rules/commit/0c82c96f2a55d8b91bbc7ee6512c94f68a206b43)

conf/bleedingEdge.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ parameters:
44
skipCheckGenericClasses!: []
55
stricterFunctionMap: true
66

7-
arrayFilter: true
87
arrayValues: true
98
readOnlyByPhpDoc: true
109
pure: true

conf/config.level5.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ parameters:
66
checkArgumentsPassedByReference: true
77

88
conditionalTags:
9-
PHPStan\Rules\Functions\ArrayFilterRule:
10-
phpstan.rules.rule: %featureToggles.arrayFilter%
119
PHPStan\Rules\Functions\ArrayValuesRule:
1210
phpstan.rules.rule: %featureToggles.arrayValues%
1311

@@ -31,6 +29,8 @@ services:
3129
arguments:
3230
treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain%
3331
treatPhpDocTypesAsCertainTip: %tips.treatPhpDocTypesAsCertain%
32+
tags:
33+
- phpstan.rules.rule
3434

3535
-
3636
class: PHPStan\Rules\Functions\ArrayValuesRule

conf/config.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ parameters:
2323
featureToggles:
2424
bleedingEdge: false
2525
skipCheckGenericClasses: []
26-
arrayFilter: false
2726
arrayValues: false
2827
illegalConstructorMethodCall: false
2928
readOnlyByPhpDoc: false

conf/parametersSchema.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ parametersSchema:
2929
featureToggles: structure([
3030
bleedingEdge: bool(),
3131
skipCheckGenericClasses: listOf(string()),
32-
arrayFilter: bool(),
3332
arrayValues: bool(),
3433
illegalConstructorMethodCall: bool(),
3534
readOnlyByPhpDoc: bool()

0 commit comments

Comments
 (0)