Code Inspection: Closure can be converted to arrow function
Reports the anonymous functions that can be transformed to short arrow functions. Support for short arrow functions is available since PHP 7.4.
See PHP RFC: Arrow Functions 2.0 (php.net) for details.
In the following example, the callback anonymous function inside
array_map() is written in two forms: regular and arrow.
Suppress an inspection in the editor
Place the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.