This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
1 Replies Last post: Aug 20, 2013 5:20 PM by Maxim Kolmakov  
yomismo yok Newbie 1 posts since
Aug 15, 2013
Currently Being Moderated

Aug 15, 2013 2:19 PM

Templating getters and setters to be on one line

I would like to have each getter and setter on one line, for instance:

public function getName(){return $this->name}


I have tried to.change the getter template but it seems to not remove the " breaks lines".  How can I do it? Is any configuration above getter templating that is avoiding to get what I want?


Moreover, I would like not to have any blank lines between generated getters and setters. For instance:

public getId ..........

public setId .....

public getname .....

public setname .......



Maxim Kolmakov JetBrains 34 posts since
Oct 15, 2012
Currently Being Moderated
Aug 20, 2013 5:20 PM in response to: yomismo yok
Re: Templating getters and setters to be on one line

To achive one liners you need to enable checkbox in "Settings->Code Style->PHP->Wrapping and Braces->Simple methods in one line" and then remove all new lines from template. Unfortunately blank lines can be removed only for all methods. Feel free to file Feature Request in

More Like This

  • Retrieving data ...