PhpStorm 2021.1 Help

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 good practice to them functions 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

  1. Position the caret at the highlighted line and press Alt+Enter or click the Intention action icon.

  2. Click the arrow next to the inspection you want to suppress and select the necessary suppress action.

Last modified: 16 July 2021