Inspectopedia
 
2024.3

Closure can be converted to arrow function

Info
New
Last modified: 03 December 2024

Reports the anonymous functions and property hooks 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.