UnusedUseStatementUnitTest.inc in Coder 8.2
File
coder_sniffer/Drupal/Test/Classes/UnusedUseStatementUnitTest.inc
View source
<?php
namespace MyNamespace\Depth;
use Foo\Bar;
use Bar\Fail;
use Test\Bar\Thing;
use Thing\Fail\ActuallyUsed;
use Test\TraitTest;
use Thing\NotUsed;
use Test\AnotherTrait;
use Thing\SomeName as OtherName;
use Thing\DifferentName as UsedOtherName;
use Another\UnusedUse;
use Example\MyUrlHelper;
use MyNamespace\Depth\UnusedSameNamespace;
use MyNamespace\Depth\AnotherUnusedSameNamespace;
use MyNamespace\Depth\SomeClass as CoreSomeClass;
use Some\Data\VarName;
use Some\Data\VarName2 as AliasVarName2;
class Pum {
use TraitTest;
use Test\AnotherTrait;
protected $x;
protected $y;
protected function test(ActuallyUsed $x, UsedOtherName $y) {
}
protected function test2(\Thing\NotUsed $x) {
}
protected function test3(MyURLHelper $x) {
}
protected function test4(UnusedSameNamespace $x, AnotherUnusedSameNamespace $y) {
}
protected function test5(CoreSomeClass $x) {
}
protected function test6($x) {
$y = $x['test'];
$z = $x['test2'];
return $y;
}
protected function test7($x) {
return $x['test'];
}
}