1.2.1310. Unused Traits¶
Those traits are not used in any class or trait. They are probably dead code, as there is no way to use a trait without a host class.
<?php
// unused trait
trait unusedTrait { /**/ }
// used trait
trait tUsedInTrait { /**/ }
trait tUsedInClass {
use tUsedInTrait;
/**/
}
class foo {
use tUsedInClass;
}
?>
1.2.1310.1. Connex PHP features¶
1.2.1310.1.1. Suggestions¶
Remove the unused trait
Actually use the trait in one class or another trait
1.2.1310.1.2. Specs¶
Short name |
Traits/UnusedTrait |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Slow (1 hour) |
Precision |
Very high |
Available in |