1.2.1301. Unused Interfaces¶
Those interfaces are defined and never used. They should be removed, as they are dead code.
Interfaces may be use as parent for other interfaces, as types (argument, return and property), in instance of.
<?php
interface used {}
interface unused {}
// Used by implementation
class c implements used {}
// Used by extension
interface j implements used {}
$x = new c;
// Used in a instanceof
var_dump($x instanceof used);
// Used in a type
function foo(Used $x) {}
?>
1.2.1301.1. Connex PHP features¶
1.2.1301.1.1. Suggestions¶
Remove the interface
Actually use the interface
1.2.1301.1.2. Specs¶
Short name |
Interfaces/UnusedInterfaces |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Instant (5 mins) |
Precision |
Very high |
Examples |
|
Available in |