hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Add quickfix for missing parent::__construct()

Open Wilfred opened this issue 3 years ago • 0 comments

Example bad code:

class MyParent {
  public function __construct() {}
}

class MyChild extends MyParent {
  public function __construct() {
    foo();
  }
}

The quickfix should add the call at the beginning of the method.

class MyParent {
  public function __construct() {}
}

class MyChild extends MyParent {
  public function __construct() {
    parent::__construct();
    foo();
  }
}

Wilfred avatar Jan 28 '22 21:01 Wilfred