Default Naming conventions in PhpStorm discriminating against camelCase variables

This one is weird. Appeared not so long ago and complains about every single variable with capital letters in it.

Couldn't find anything in PSR standards or otherwise. In fact all code examples in PSR repo use camelcase for their variables. 

I'm guessing pattern [a-z][_a-z\d]* should be [a-z][_a-zA-Z\d]*.

I know (now, after some diggin) that this is totally configurable, but it can throw a curveball to someone not in the know.

0

Honestly speaking, this inspection is disabled by default, so one may notice the configuration pattern while enabling it.

However, you are right and the default pattern has no logic at all, so I have discussed the situation with devs and opened a YouTrack ticket, please feel free to vote & subscribe:

https://youtrack.jetbrains.com/issue/WI-56985

1

Thanks for the quick answer. Sounds good! 

"this inspection is disabled by default"

I don't remember having enabled it though. Maybe reckless keyboard mashing accidentally turned the feature on.

0

请先登录再写评论。