Reputation: 73
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).
Upvotes: 6
Views: 1268
Reputation: 165188
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.
EDIT: This has been implemented since v9.0 (released in 2015) and the default template can be found and altered at "Settings/Preferences | Editor | File and Code Templates"
Upvotes: 6
Reputation: 357
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.
Upvotes: 2