PHP variable name is not being automatically generated, into the docblock, after type placeholder
I noticed a pretty glaring bug here, there is no varName after [type] when you create a docblock annotation. I am using SublimeText3 on OSX Yosemite
Current Behavior
<?php
/**
* [addWhere description]
* @param [type]
* @param [type]
* @param [type]
* @param array
*/
public function addWhere($column, $operator, $value, $args = array()) {
// ...
}
Desired Behavior
The correct format should be
@param [argument type] [argument name] [argument description]
So the corrected code after typing /** should be
<?php
/**
* [addWhere description]
* @param [type] $column [description]
* @param [type] $operator [description]
* @param [type] $value [description]
* @param array $args [description]
*/
public function addWhere($column, $operator, $value, $args = array()) {
// ...
}
This works for me... There are two settings which would modify this though:
// Add a '[description]' placeholder for the param tag?
"jsdocs_param_description": true,
// Add a name of parameter in param tag?
"jsdocs_param_name": true,
If both of those are false (which is not the default), then you'd see the output you've included in your post.
I had the same issue, and I had to add the two settings mentioned by @spadgos to my Settings - User file for it to work, even though they were set to true in the Settings - Default file.
I don't know why that didn't work, but I think in general it's not a good idea to edit the defaults file, since that will be overwritten each time ST updates.
Same issue for me. Just installed DocBlocker and it does NOT contain param names in a generated docblock:
/**
* Gets the
* @param {[type]}
* @param {[type]}
* @param {[type]}
* @param {[type]}
* @return {[type]}
*/
var getConfig = function(practice, workflow, role, view) {
}
I had the same issue, and I had to add the two settings mentioned by @spadgos to my Settings - User file for it to work, even though they were set to true in the Settings - Default file.
+1. After adding these lines to Settings => User (despite the fact they was explicitly set to true in Settings => Default), it worked.
Even though PSR5 is currently in the "Proposed" status, it is evident that this is how the annotation should look.
https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#55-examples
Same here, it doesn't work when its packaged in a sublime-package-file but it works when you unpack it.
+1 Installed the DocBlockr plugin via Package Control inside of ST2. Javascript function block did not generate param names.
Neither Settings-Default nor Settings-User contained any reference to DocBlockr or jsdocs.
Adding the two options specified by @spadgos above "jsdocs_param_description": true, "jsdocs_param_name": true, into Settings-User fixed the issue
+1
I'm having this very same issue in Sublime 3.
The fix mentioned before still works.
Just had the same issue, tried the user settings and while it works I also checked something else. Uninstalled, installed again - same issue. I have restarted sublime (without adding any user settings) and it all works fine. So just restart sublime after install and you should be fine.
Just had the same issue, tried the user settings and while it works I also checked something else. Uninstalled, installed again - same issue. I have restarted sublime (without adding any user settings) and it all works fine. So just restart sublime after install and you should be fine.
it worked. thanks