A naming convention in software development is a set of guidelines for naming code elements like variables, functions, and classes.
The goal of a naming convention is to make the code more readable and understandable, which makes it easier to maintain and debug. It also ensures
consistency in the code, especially when multiple developers are working on the same project.
This rule checks that field names match a provided regular expression.
Using the regular expression ^[a-z][a-zA-Z0-9]*$
, the noncompliant code below:
class MyClass {
$my_field;
}
Should be replaced with:
class MyClass {
$myField;
}