From 9b372989e8b2027de2e2e23aede04e01b61e911f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Sat, 9 Mar 2024 13:54:10 +0100 Subject: [PATCH] SlevomatCodingStandard.Namespaces.UnusedUses: More tests --- tests/Sniffs/Namespaces/UnusedUsesSniffTest.php | 1 + tests/Sniffs/Namespaces/data/unusedUses.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/Sniffs/Namespaces/UnusedUsesSniffTest.php b/tests/Sniffs/Namespaces/UnusedUsesSniffTest.php index d77fd5ba1..147a926a5 100644 --- a/tests/Sniffs/Namespaces/UnusedUsesSniffTest.php +++ b/tests/Sniffs/Namespaces/UnusedUsesSniffTest.php @@ -68,6 +68,7 @@ public function testUnusedUse(): void self::assertNoSniffError($report, 29); self::assertNoSniffError($report, 30); + self::assertNoSniffError($report, 31); self::assertNoSniffError($report, 91); } diff --git a/tests/Sniffs/Namespaces/data/unusedUses.php b/tests/Sniffs/Namespaces/data/unusedUses.php index 9e4607e26..9f8fbcd51 100644 --- a/tests/Sniffs/Namespaces/data/unusedUses.php +++ b/tests/Sniffs/Namespaces/data/unusedUses.php @@ -28,6 +28,7 @@ use ReferenceClass; use ClassWithStaticVariable; use ClassWithConstant; +use function Psl\Type\null; class TestClass implements FirstInterface, SecondInterface { @@ -67,3 +68,5 @@ protected function withUnion(UnionType|UnionType2|bool $union) } } + +null();