diff --git a/README.md b/README.md index 01aa3064..7aff4bf4 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ * Correct case for inherited and implemented method names. * Contravariance for parameter types and covariance for return types in inherited methods (also known as Liskov substitution principle - LSP) * Check LSP even for static methods +* Check missing typehint in anonymous function when a native one could be added Additional rules are coming in subsequent releases! diff --git a/rules.neon b/rules.neon index 0d53b0cc..a26aae52 100644 --- a/rules.neon +++ b/rules.neon @@ -6,6 +6,7 @@ parameters: checkAlwaysTrueStrictComparison: true checkExplicitMixedMissingReturn: true checkFunctionNameCase: true + checkMissingClosureNativeReturnTypehintRule: true reportMaybesInMethodSignatures: true reportStaticMethodSignatures: true diff --git a/tests/Levels/data/foreach.php b/tests/Levels/data/foreach.php index 5b83a3d5..a762fb6b 100644 --- a/tests/Levels/data/foreach.php +++ b/tests/Levels/data/foreach.php @@ -1,6 +1,6 @@