PHP function comments contain HTML tables

I Ctrl+clicked on a function error_log in the code to see how the 2nd param worked ($message_type) and it opened up file standard_3.php (not sure where this is coming from) and when I go to see what $message_type can be, all of the specifications are in an HTML table in the function comments; it's almost impossible to read.

Is this a PHP quirk or a PHPStorm quirk? Is there something to click to get those comments to be readable? I don't know why there's HTML split among code commenting. I clicked the function so I didn't have to go to php.net to look it up, plus we're using PHP 5.2 for legacy reasons.

4 comments
Comment actions Permalink

Hi there,

it opened up file standard_3.php (not sure where this is coming from)

Bundled stub files -- such files contain all functions/classes/etc that are known to PhpStorm by default.
Is this a PHP quirk or a PHPStorm quirk

None of these.

Is there something to click to get those comments to be readable?

"View | Quick Documentation" instead of Ctrl+clicking

0
Comment actions Permalink

Bundled stub files -- such files contain all functions/classes/etc that are known to PhpStorm by default.

OK, but the function comments are still impossible to read because they're HTML inside of a block comment. Why would anyone think this makes sense?

"View | Quick Documentation" instead of Ctrl+clicking

OK, but that's more time-consuming than Ctrl+click, so is there not a shortcut? This isn't sensible; one of the reasons I don't waste a ton of time like people with non-IDE text editors is because of these shortcuts.

0
Comment actions Permalink
OK, but the function comments are still impossible to read because they're HTML inside of a block comment. Why would anyone think this makes sense?

Because they meant to be viewed via "View | Quick Documentation" and not by browsing stub sources.

OK, but that's more time-consuming than Ctrl+click, so is there not a shortcut?

What is stopping you from using a shortcut?

Shortcut exists in Default keymap. Since you are using specific/non default keymap -- you should check what shortcut is assigned there .. and if nothing -- assign your own in "Settings/Preferences | Keymap"

0
Comment actions Permalink

"Because they meant to be viewed via "View | Quick Documentation" and not by browsing stub sources."

This opens up a tiny little window that is difficult to use and has rich text with none of the colorized formatting of a normal PHP file that the stub source has, which is opened the same way any other function in PHP is. This is not only extra steps (to open, format window, and close) but counter-intuitive and counter-productive. I can't always tell when a function is built-in PHP or not. Is there no way to see the stub source formatted the way normal PHP function comments are? Every other function comment I've seen in code, Zend or otherwise, is commented without HTML embedded in it, it's nonsensical. If JetBrains is using the HTML in the comments to format them for Quick Documentation, they can take stub comments and format them into HTML (I can already think of how to do this). Any way we can get this to behave intuitively and easily?

"What is stopping you from using a shortcut?"

There is a shortcut but it still requires clicking on the (possibly built-in PHP) function, then hitting Ctrl+Shift+Space (in my editor); because I can't always tell if a Ctrl+click is going to push me to the source stub or actual readable function comments, it's more button presses anyways (Ctrl+click is simplest and most common). I don't know why they're doing it this way or how to make it sensible. Is there nothing I can do to clean this up?

0

Please sign in to leave a comment.