PhpStorm 2022.1 Help

Code Inspection: Suspicious variable/parameter name combination

Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it.

Example:

var x = 0; var y = x;

or

var x = 0, y = 0; var rc = new Rectangle(y, x, 20, 20);

Specify the names that should not be used together. An error is reported if a parameter name or an assignment target name contains words from one group while the name of the assigned or passed variable contains words from another group.

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: 13 May 2022