PhpStorm 2024.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.


var x = 0; var y = x;


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

Here the inspection guesses that x and y are mixed up.

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. Place 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: 11 February 2024