Automatic @see comment for overwritten methods (like in Eclipse)


we've been using Eclipse before switching to PHPStorm and we really liked how delegated methods automatically got a comment with a @see attribute pointing to the overwritten parent method.
As far as I understood this was not a regular PHPDoc behavior, but is there a way to accomplish this is PHPStorm, too?
Typing it by hand every time really gets annoying after a while (because we overwrite a lot :-D).

If required I can give some examples or screenshots.

Comment actions Permalink

Hi there,

but is there a way to accomplish this is PHPStorm, too?

Automatically -- No.

Feel free to submit Feature Request ticket to the Issue Tracker

Comment actions Permalink

Well, that's that. Thx for the fast reply. Just wanted to make sure i don't post a feature request for an already existing feature.

Comment actions Permalink

Settings | File and Code Templates | Includes | PHP Function Doc Comment

You can add your custom text/tags there .. but

  1. It will be used for all functions/methods, even if they do not override one from parent class
  2. There is no template variable that can reference parent class name... so you will have to provide it (parent class name) every time.

Therefore it still will not provide desired behaviour as described (only partially).

Comment actions Permalink

Thanks for the suggestion. I already experimented a little with the templates and also managed to overwrite ALL method headers... very convinient indeed...
As for the way it was handled in Eclipse you had a separate entry in the comment template section for "overriding methods" and / or "delegate methods" which used the template variables {$see_to_overridden} {$see_to_target}. I also tried this, but without satisfying results.



Please sign in to leave a comment.