1.2.1371. Used Interfaces¶
This rule lists all the interfaces used in the code. They are used with the
implementskeyword, theinstanceofoperator, and as types with parameters, class constants, properties and methods.
<?php
interface used {}
// 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 typehint
function foo(Used $x) {}
?>
1.2.1371.1. Connex PHP features¶
1.2.1371.1.1. Specs¶
Short name |
Interfaces/UsedInterfaces |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |