diff --git a/composer.json b/composer.json index 8763977c1..2ac38f82b 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "php": "^7.2 || ^8.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "phpstan/phpdoc-parser": "^1.23.1", - "squizlabs/php_codesniffer": "^3.7.1" + "squizlabs/php_codesniffer": "^3.9.0" }, "require-dev": { "phing/phing": "2.17.4", 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();