Add comment after getter and setter generator in PHP

Hi,

I want to overwrite templates of the generation of getters and setters by adding //end get${NAME} at the end of function.

I already have overload the PHP Getter Method, PHP Setter Method and PHP Fluent Setter, but when i generate automatically the getter and setter, i don't have the comments.

/**
* @param ${TYPE_HINT} $${PARAM_NAME}
*
* @return ${CLASS_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;
}//end set${NAME}()

I'd like to add the last line.

0
3 comments
Avatar
Permanently deleted user

I really need help.

Up ?

0

Hi there,

I've tried to so the same (back when you first posted it) .. and got the same as you -- IDE just removes any comments placed after method's closing brace. But if I put such comment inside the method body .. it will remain.

No idea what to suggest (I mean -- the solution).

The best I can offer -- file a Bug ticket at Issue Tracker .

0
Avatar
Permanently deleted user

Thanks for your answer.

I follow your recommandation and open a ticket about this problem.

I will update this post if i got the answer.

0

Please sign in to leave a comment.