Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Libero/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
<property name="allowFallbackGlobalFunctions" value="false"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing"/>
Expand Down
21 changes: 21 additions & 0 deletions tests/cases/php/use-unused
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---DESCRIPTION---
Use statements must be used
---FILENAME---
Grault.php
---CONTENTS---
<?php

Expand All @@ -9,16 +11,35 @@ namespace Vendor;

use Foo;
use Bar\Baz;
use Garply;
use const QUX;
use const Bar\QUUX;
use function quuz;
use function Bar\corge;

interface Grault
{
/**
* @throws Garply
*/
public function waldo() : void;
}

---FIXED---
<?php

declare(strict_types=1);

namespace Vendor;

use Garply;

interface Grault
{
/**
* @throws Garply
*/
public function waldo() : void;
}

---