Firstly, I'm running PHPStorm 6.0.3. Everything's up-to-date.

I recently started using PHPStorm, and came across an annoyance that I can't seem to get to the bottom of. I like the fact that DocBlocks can be automatically generated, and when I type /** + return above a property/method/class, everything works just fine, and the comment appears like this:

/**
 * Class Message
 */
abstract class Message {
...

When I try to run generate > PHPDoc Blocks (through right-click context menu, CMD+N, or the "Code" menu) for an entire class, however, the DocBlocks do not honor the trailing newline character that is definitely in the template definition (I've checked many times). The comment block appears like this:

/**
 * Class Message
 */abstract class Message {
...

...which is rather annoying in that I have to go through and add a newline for every generated comment (above every property/method/class).

I've tried searching for a solution, and fiddling with settings, but nothing seems to work. Any help is very much appreciated!

有帮助吗?

解决方案

Quite likely it could be because of your Code Style settings (bug in PhpStorm, if that is the case), like it is there for functions/methods: http://youtrack.jetbrains.com/issue/WI-12315

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top