spadgos / sublime-jsdocs

Simplifies writing DocBlock comments in Javascript, PHP, CoffeeScript, Actionscript, C & C++
MIT License
3.11k stars 278 forks source link

PHP7.4 Return type not being detected #469

Open leon-v opened 4 years ago

leon-v commented 4 years ago
<?
/**
 * [test description]
 * @param  bool|boolean $test [description]
 * @return [type]             [description]
 */
function test(bool $test = true) : bool {
    return false;
}
?>

The return type above is specified as bool, but [type] is used in the auto-generated docblock.

Expected result is:

<?
/**
 * [test description]
 * @param  bool|boolean $test [description]
 * @return bool               [description]
 */
function test(bool $test = true) : bool {
    return false;
}
?>
8ctopus commented 1 year ago

Problem is fixed if you override jsdocs.py with this one: https://github.com/CodeByZach/sublime_docblockr/blob/5c15a26789577d63f692f5ead11aab4aefffb505/jsdocs.py

To override, create directory DocBlockr inside the Packages dir then add the jsdocs.py file inside the directory.