1.2.334. Defined Class Constants¶
Checks if class constants are defined. This includes class constants, one level of parent (extended) or interfaces (implemented).
This analysis takes into account native PHP, extension and stubs class definitions.
<?php
class X {
const Y = 2;
function foo() {
// This is defined on the line above
echo self::Y;
// This is not defined in the current code
echo X::X;
}
}
?>
1.2.334.1. Connex PHP features¶
1.2.334.1.1. Specs¶
Short name |
Classes/DefinedConstants |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |