Summer Sale! All accounts are 50% off this week.

pbm's avatar
Level 3

Favorite Sublime Text plugin for generating DocBlocks

Hi there,

What plugin do you folks use to generate DocBlocks within Sublime Text? Of course there is phpfmt but it doesn't support the Return Types feature which got introduced with PHP 7.0.

Thanks for sharing!

0 likes
3 replies
SaeedPrez's avatar

I use DocBlockr, but I don't think it supports return types either.. it just does @return [type]

Edit: I wrote the example function first and then ran DocBlockr, this is what it output..

/**
 * [sayMyName description]
 *
 * @param  string $name
 *
 * @return [type]
 */
function sayMyName(string $name)
{
    return (string) $name;
}
1 like
Dannnniel's avatar

You can try DoxyDoxygen. This plugin support Php 7 and have a lot of advanced function (like FQN). Here the output for your example:

/**
 * { function_description }
 *
 * @param      string  $name   The name
 *
 * @return     string  ( description_of_the_return_value )
 */
function sayMyName(string $name)
{
    return $name;
}

Please or to participate in this conversation.