1.2.1239. True False Inconsistant Case¶
TRUE, true or True is the favorite way to write these values.
Usually, source code chooses either ALL CAPS booleans and null <https://www.php.net/`null>`_, either all lowercase. Sometimes, there is no standard.
When the source code uses a majority of one of the above convention, then the analyzer reports all remaining inconsistently cased constants.
This rule works on booleans and the null <https://www.php.net/`null>`_ value, altogether.
<?php
$a1 = true;
$a2 = true;
$a3 = true;
$a4 = true;
$a5 = true;
$a6 = true;
$a7 = true;
$a8 = true;
$a9 = true;
$a10 = true;
// This convention is inconsistence with the rest
$b1 = TRUE;
?>
See also PHP Constants.
1.2.1239.1. Connex PHP features¶
1.2.1239.1.1. Specs¶
Short name |
Constants/InconsistantCase |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |