Active
Project:
Coder
Version:
8.x-3.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Jul 2020 at 11:15 UTC
Updated:
16 Jul 2020 at 11:16 UTC
Jump to comment: Most recent
class a {
public static function create() {
$instance = new static();
$instance->doSomething();
return $instance;
}
private function doSomething() {
}
}
Is legal PHP code but the coder rule is incorrectly reporting the private method as not used. Imo this rule should be removed - it now has two bugs. See #3063390: False positive "Unused private method" when call is interpolated. Both of which are hard to solve.
Comments
Comment #2
alexpott