Shared coding conventions allow teams to collaborate efficiently. This rule checks that all constant names match a provided regular expression.
With the default regular expression ^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$:
define("const1", true);
class Foo {
const const2 = "bar";
}
define("CONST1", true);
class Foo {
const CONST2 = "bar";
}