Skip to content

Commit

Permalink
SlevomatCodingStandard.Namespaces.UnusedUses: Fixed false positive th…
Browse files Browse the repository at this point in the history
…anks to PHPCS upgrade
  • Loading branch information
kukulich committed Mar 9, 2024
1 parent 8d0f603 commit 923e121
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions tests/Sniffs/Namespaces/UnusedUsesSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function testUnusedUse(): void
self::assertNoSniffError($report, 29);

self::assertNoSniffError($report, 30);
self::assertNoSniffError($report, 31);

self::assertNoSniffError($report, 91);
}
Expand Down
3 changes: 3 additions & 0 deletions tests/Sniffs/Namespaces/data/unusedUses.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use ReferenceClass;
use ClassWithStaticVariable;
use ClassWithConstant;
use function Psl\Type\null;

class TestClass implements FirstInterface, SecondInterface
{
Expand Down Expand Up @@ -67,3 +68,5 @@ protected function withUnion(UnionType|UnionType2|bool $union)
}

}

null();

0 comments on commit 923e121

Please sign in to comment.