Code Inspection: 'match' can be replaced with 'switch' statement
Configure inspections: Settings | Editor | Inspections
Show intention actions: AltEnter
Reports the match
expressions that can be replaced with switch
statements.
Note that match
expressions use strict type comparison, while switch
statements rely on loose comparison. As a result, the expression semantics may change after replacement.
See match (php.net) and switch (php.net) for details.
Place the caret at the highlighted line and press AltEnter or click
.
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.