1.2.1447. Wrong Function Name Case¶
The spotted functions are used with a different case than their definition. While PHP accepts this, it makes the code harder to read.
It may also be a violation of coding conventions.
<?php
// Definition of the class
function foo () {}
// Those calls have wrong case
FOO();
\Foo();
// This is valid
foo();
?>
See also PHP class name constant case sensitivity and PSR-11.
1.2.1447.1. Connex PHP features¶
1.2.1447.1.1. Suggestions¶
Match the defined functioncall with the called name
1.2.1447.1.2. Specs¶
Short name |
Functions/WrongCase |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Instant (5 mins) |
Precision |
Very high |
Available in |