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 .......



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 http://youtrack.jetbrains.com 


Hi sorry for add a response on an old topic ... There is a solution for that ?

$toto = new Toto()






Do I understand correctly that you want to have no indent for setters? If that so, the only option is to set "Continuation Indent" to 0 in Preferences | Editor | Code Style | PHP but this will disable it everywhere. 

There is also an option Preferences | Editor | Code Style | PHP | Wrapping and Braces | Chained method calls | Place new ; on new line. That will move ";" on the next line as you wanted.


Yep that's it ty

I added continuation indent :D


Please sign in to leave a comment.