1.2.1308. Unused Public Methods¶
This rule lists unused public methods.
Unused public methods are declared as public
in the class, but never called, including outside the class.
<?php
class x {
public function usedMethod() {}
// There is no call to this method
public function unusedMethod() {}
}
$x = new x();
$x->usedMethod();
?>
1.2.1308.1. Connex PHP features¶
1.2.1308.1.1. Specs¶
Short name |
Classes/UnusedPublicMethod |
Rulesets |
|
Exakat since |
2.4.9 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Slow (1 hour) |
Precision |
Medium |
Related rule |
Unused Private Methods, Unused Protected Methods, Unused Methods |
Available in |