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

alexpott created an issue. See original summary.

alexpott’s picture

Issue summary: View changes