MARTIN Damien
MARTIN Damien

Reputation: 1026

How to change automatic variable generation in PhpStorm?

With PhpStorm, if you type function foo(MyClass $, it will propose myClass as the variable name.

But since I added a WordPress project (I accepted default settings for WordPress as proposed), it propose my_class instead.

I really would like to bring back the camel case naming by default, but I don't find where it is configured.

Is there an option for this? Or maybe a configuration file to edit?

Upvotes: 1

Views: 48

Answers (1)

DarkChipolata
DarkChipolata

Reputation: 965

In the settings (Ctrl+Alt+S), go to Editor > Code Style > PHP, then click the Other tab. At the bottom of the screen, you should see the Variable Naming Style section. Select camelCase.

Upvotes: 3

Related Questions