From 4bfbe3ef8dd00a2f252c4d1c5571c3e98241203c Mon Sep 17 00:00:00 2001 From: scollovati <20740642+scollovati@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:04:35 +0100 Subject: [PATCH] add test fixture to skip default parameter value --- .../Fixture/SkipDefault.php | 21 +++++++++++++++++++ ...rrowPublicClassMethodParamTypeRuleTest.php | 1 + 2 files changed, 22 insertions(+) create mode 100644 tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/SkipDefault.php diff --git a/tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/SkipDefault.php b/tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/SkipDefault.php new file mode 100644 index 00000000..112fd6e5 --- /dev/null +++ b/tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/SkipDefault.php @@ -0,0 +1,21 @@ +dontSetParamValue(); + } +} diff --git a/tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php b/tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php index a7affa7e..37709674 100644 --- a/tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php +++ b/tests/Rules/NarrowPublicClassMethodParamTypeRule/NarrowPublicClassMethodParamTypeRuleTest.php @@ -26,6 +26,7 @@ public function testRule(array $filePaths, array $expectedErrorsWithLines): void public static function provideData(): Iterator { + yield [[__DIR__ . '/Fixture/SkipDefault.php'], []]; yield [[__DIR__ . '/Fixture/SkipResource.php'], []]; yield [[__DIR__ . '/Fixture/SkipDateTimeMix.php'], []]; yield [[__DIR__ . '/Fixture/SkipNonPublicClassMethod.php'], []];