PhpStorm 2020.3 Help

Code Inspection: Variable is declared and being used in different 'case' clauses

Reports variables that are declared in one case clause of a switch statement, and are used in a different case clause of the same statement. For block-scope variables, this results in a ReferenceError being thrown. For var -variables, it signifies a potential error. This inspection can be disabled for var -variables if you use this pattern intentionally.

Last modified: 08 May 2020