Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the phpstorm custom constructor template?

I'm using phpstorm code > Generate... > constructor to get:

function __construct()
{
}

But I want:

public function __construct()
{
}

How can I change the template? Can't find anything and I don't want to use live templates instead (I like the generate function).

like image 202
user3776663 Avatar asked Jun 25 '14 19:06

user3776663


2 Answers

How can I change the template?

You cannot. There is no template for constructor unfortunately.

http://youtrack.jetbrains.com/issue/WI-16548

Follow this ticket (star/vote/comment) to get notified on progress.

like image 198
LazyOne Avatar answered Nov 16 '22 10:11

LazyOne


You can do this by opening the preferences window. In there you'll find "File and Code Templates". On the code tab you can adjust all templates.

enter image description here

like image 2
JoeriV Avatar answered Nov 16 '22 10:11

JoeriV