0

When I do a class import, in the code documentation, PhpStorm inserts the whole class along with its full namespace:

enter image description here

How to configure PhpStorm to insert just the class name (with the import statement) like in the screenshot below?

enter image description here


And the second question is when you press Alt + Enter PhpStorm inserts documentation with the @inheritDoc tag as in the screenshot below:

enter image description here

How can I make PhpStorm insert documentation without this tag and immediately necessary?

enter image description here

LazyOne
  • 158,824
  • 45
  • 388
  • 391
  • 1
    1) Please check what you have for `Settings (Preferences on macOS) | Editor | Code Style | PHP | PHPDoc | Generated PHPDoc tags | Use fully-qualified class names`. Also check your options at `Settings (Preferences on macOS) | Editor | General | Auto Import`, PHP section. – LazyOne Jan 17 '22 at 12:45
  • 2) Seems to generate the params/return types to me just fine (although it does not insert the inherited method description (and never did that)). Would be good to have some simple project (a bunch of files with classes) so that it can be tested on the same code. No specific option comes into my mind right now... I do not know what to even thing about this one. **P.S.** Using latest 2021.3.1 version though. – LazyOne Jan 17 '22 at 12:51
  • thanks! this was required, but do you have an answer to the second question? – Vitaly Litvinov Jan 17 '22 at 12:52
  • Anyway -- how do you generate that `makeARead()` method body? As I understand the declaration comes from some interface? If so -- the dedicated `Code | Override Methods...` dialog has an option just for that. – LazyOne Jan 17 '22 at 12:53
  • @LazyOne you can try on this interfacehttps://github.com/VitalyLitvinov74/vloop.entities/blob/master/src/contracts/Entity.php – Vitaly Litvinov Jan 17 '22 at 12:54

0 Answers0