Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPStorm: Auto generate the inheritdoc documentation when implementing methods of an abstract parent class

Tags:

phpstorm

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?

like image 524
jhnferraris Avatar asked Jan 23 '15 03:01

jhnferraris


1 Answers

  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

like image 64
dmsmidt Avatar answered Oct 04 '22 11:10

dmsmidt