18

Been using PHPStorm and whenever I implement the abstract method of a parent class to some subclass I run the Implement Methods command in which it auto-generates the function blocks and its doc blocks.

It annoys me that I still need to manually modify the doc blocks to {@inheritdoc}.

My question now, Is there a way to configure PHPStorm to generate {@inheritdoc} doc block when implementing methods instead of it generating the original doc block?

5
  • 1
    Unfortunately not -- ATM it's not configurable.
    – LazyOne
    Commented Jan 23, 2015 at 10:48
  • Oh. hope they can put it in one of their updates. @LazyOne Commented Jan 27, 2015 at 1:19
  • 1
    youtrack.jetbrains.com/issue/WI-16547 indicates that it's been implemented, but youtrack.jetbrains.com/issue/WI-27869 says it hasn't, so I don't know what to think. It doesn't seem to work for me.
    – Opux
    Commented Jan 26, 2016 at 21:50
  • Did you find a solution to this? I've been having the same problem. Commented Apr 13, 2016 at 5:28
  • @Yep_It's_Me No not yet. I'll just wait for Jetbrains for updates I guess. hehe Commented Apr 13, 2016 at 6:26

1 Answer 1

6
  1. In the menu go to Code > Generate > Implement method (Ctrl+I)
  2. Check 'Add PHPDoc'
  3. Select 'With @inheritDoc tag'

Source: https://youtrack.jetbrains.com/issue/WI-16547

1
  • 1
    Not ideal, but still better than the autofix. +1
    – musicin3d
    Commented Jan 16, 2018 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.