diff --git a/tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/ExplicitlyNullableParams.php b/tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/ExplicitlyNullableParams.php new file mode 100644 index 00000000..68e1d5e4 --- /dev/null +++ b/tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/ExplicitlyNullableParams.php @@ -0,0 +1,21 @@ +test(false); + } +} diff --git a/tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php b/tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php index a62308c4..ff2044be 100644 --- a/tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php +++ b/tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php @@ -155,7 +155,11 @@ public static function provideData(): Iterator yield [[__DIR__ . '/Fixture/SkipEnum.php'], []]; $argErrorMessage = sprintf(NarrowPublicClassMethodParamTypeRule::ERROR_MESSAGE, 'int'); + yield [[__DIR__ . '/Fixture/HandleDefaultValue.php'], [[$argErrorMessage, 15]]]; + + $argErrorMessage = sprintf(NarrowPublicClassMethodParamTypeRule::ERROR_MESSAGE, 'bool'); + yield [[__DIR__ . '/Fixture/ExplicitlyNullableParams.php'], [[$argErrorMessage, 9]]]; } /**