Newbie question with autocompleting classes


I'm giving PhpStorm a testdrive, and so far, I love it.  One quick question I have is how to get new classes created within php scripts to automatically complete my constructor function.  I did some online searching, and I think that I need to go to "Override Methods"; however, it's currently greyed out.  Any help would be appreciated.



I'm not sure what you mean. Can you be more specific or provide some sample code?


It's not actually code.  Basically, when I type the word class  Blah{ , phpStorm automatically spits out

class Blah{}

i.e. it adds in an extra brace, which is helpful.

It would be great, however, if it could spit out:

class Blah {
     public function __construct(){



Does that make more sense?

You cannot do this automatically.

Either use "Code | Override Methods..." (invoke it while standing inside the class)

or create some custom Live Template (Settings | Live Templates).


Thank you for clearing this up for me!


Please sign in to leave a comment.