Updating doc blocks?

I routinely add parameters to my function calls, and I was wondering if there's a simple way to use PHPStorm to update them?  I can, of course, recreate the entire block, but that's time consuming and I then need to copy over my function description.  Is there a simple way to say 'add this parameter to the doc block'?

PHPStorm EAP 359 - OSX 10.7

0
8 comments

ALT-ENTER is better, but it would help if the mark was on the variable, not the comment...that makes me backtrack.

2

I wouldn't call it 'simple', as I'd like the option from a keyboard shortcut, but if you hover over the current PHPDoc area, you get the red light bulb and can choose Update PHPDoc Comment:

Capture.JPG

0

How interesting.  I don't have that light bulb in the latest EAP.

0

I'm on 110.359.

Do you get the grey underlining?

If not, it's because your Inspection for PHPDocs is turned off (and must be there for this to work.)

0

I do.  Note the light bulb does appear for the apparent misspelling of my parameter (which I changed to test this):



Attachment(s):
Screen Shot 2011-11-15 at 10.25.22 AM.png
0

Mac, Windows or Linux?

0

No need to wait for bulb. Just press Alt-Enter within the any inspection highlight (gray weaving in this case) to pop it up.

Also, Code|Inspect Code & Code|Run inpection by name (type PHPDOC into search box) provide a way to do this on entire project
(but its a bit broken now, see  http://youtrack.jetbrains.net/issue/WI-8435)

0

Nice, thanks!  Much better than doing it by hand.

0

Please sign in to leave a comment.