1.2.663. Makes Class Constant Definition¶
This rule adds DEFINITION link between class constant definitions and their usage. These links are used later to identify the values delivered by the constant.
<?php
class x {
public const A = 1;
}
// Link to the constant definition
echo x::A;
// Cannot find the original class
echo $x::A;
?>
1.2.663.1. Connex PHP features¶
1.2.663.1.1. Specs¶
Short name |
Complete/MakeClassConstantDefinition |
Rulesets |
|
Exakat since |
1.9.2 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
High |
Available in |