Unfortunately, this doesn't work yet. PhpStorm will only generate 1 setter method regardless of the template, it seems.
A bug report has been filed at http://youtrack.jetbrains.com/issue/WI-12552
Unfortunately, this doesn't work yet. PhpStorm will only generate 1 setter method regardless of the template, it seems.
A bug report has been filed at http://youtrack.jetbrains.com/issue/WI-12552
#if (${TYPE_HINT} == "array") | |
/** | |
* @param mixed $element | |
*/ | |
public ${STATIC} function add${NAME}($element) | |
{ | |
#if (${STATIC} == "static") | |
self::$${FIELD_NAME}[] = $element; | |
#else | |
$this->${FIELD_NAME}[] = $element; | |
#end | |
} | |
#end | |
/** | |
* @param ${TYPE_HINT} $${PARAM_NAME} | |
*/ | |
public ${STATIC} function set${NAME}($${PARAM_NAME}) | |
{ | |
#if (${STATIC} == "static") | |
self::$${FIELD_NAME} = $${PARAM_NAME}; | |
#else | |
$this->${FIELD_NAME} = $${PARAM_NAME}; | |
#end | |
return $this; | |
} |