PHPDoc settings using interfaces in PhpStorm

283 views Asked by At

In my project I have an interface IAction which has PHPDoc for all functions. When I create a class which implements the interface I am getting an inspection error since there are methods that must be implemented. Hitting cmd+Enter allows me to add method stubs:

Inspection Fix

Unfortunately the auto generated code copies over the PHPDoc like this:

Unexpected PHPDoc

Surprisingly, when I press ctrl+I to select which methods to implement, I can specifically select the documentation style:

Option to select documentation type

I was wondering whether there is any setting to choose how method stubs are documented when using the cmd+Enter inspection fix. I would like to use @inheritDoc to prevent code duplication and conflicting documentation if I happen to change something later on.

0

There are 0 answers