Code Inspection: Case mismatch in method call or class usage
Reports the usages of functions, methods, classes, and namespaces that do not match the case used in their declarations.
In PHP, class names as well as function/method names are case-insensitive, but it is considered to be good practice to call them as they appear in their declaration. In the following example, the function that is defined as exampleFunction()
is called as ExampleFunction()
, which is discouraged.
function exampleFunction($a) {
echo $a;
}
ExampleFunction('Foo');
Suppress an inspection in the editor
Place the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.
Last modified: 16 May 2022