How to enforce snake_case for properties with PHPCS?

551 Views Asked by At

I am trying to find rule which will enforce ONLY properties to be in $snake_case

I have this for CamelCase:

<rule ref="Squiz.NamingConventions.ValidVariableName.NotCamelCaps"/>

Is there any full list of these rules and what they do? Cannot find them. Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

I ended up including Wordpress Coding Standard and adding this rule:

<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/>