Hi guys,
I've got an abstract base class:
abstract class BaseClass {
/**
* @return CLASSNAME
*/
public function fluent() {
// do stuff
return $this;
}
}
Generally, i would put BaseClass where CLASSNAME is and all would be fine, PDT would pick up the phpdoc return type and happily autocomplete.
Until, that is, I subclass BaseClass and add additional methods, and code compete on an instance of the derived class. PDT will only recognise the methods from BaseClass and not those from the derived class.
What I need is something like @return self or @return this.
Does PDT have such functionality? Or is there an alternate trick without having to declare these methods in every derived class?