Is there a way to apply new PhpDoc without redeclaration of method, for instance I have a class which:
class GeneralContainer {
private $children;
public function __construct() {
$this->children = $this->CreateChildren();
}
protected function CreateChildren() {
return new GeneralChildren($this);
}
/**
* @return GeneralChildren
*/
public function Children() {
return $this->children;
}
}
After overriding the "CreateChildren" method the following way:
class SpecializedContainer extends GeneralContainer {
protected function CreateChildren() {
return new SpecializedChildren($this);
}
/**
* @return SpecializedChildren
*/
public function Children() {
return parent::Children()
}
}
The "Children" method will now return object of "SpecializedChildren". But for the sake of giving a hint to NetBeans I'm obligated also to override the "Children" method and give it a hint using PhpDoc. Is there a way to give a hint to NetBeans telling it that the base method will now return other type without actually overriding the method?