Your thoughts on how to generate @property tags?

Here's the scenario, I will have a class with properties like this:

 
/**
* @var string
* @readwrite
*/
protected $_label;

/**
* @var string
* @readwrite
*/
protected $_name;

/**
* @var string
* @readwrite
*/
protected $_type;

/**
* @var string
* @readwrite
*/
protected $_placeholder;



ETC...

They are all accessible via magic method like this:
$object->label;
$object->name;
etc...

I typically have to then manually go and define a DocComment like this:

 
/**
* Description of class
*
* @author  meep
* @created 2015-03-04
* @version 0.1
*
* @property string $label
* @property string $name
* @property string $type
* @property string $placeholder
* @property string $icon
* @property string $value
* @property array  $options
*/



Does anyone know of how to setup PHPStorm so that you can auto-generate those @property tags based on the property definitions?

Thanks for any insight!

Please sign in to leave a comment.