PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: Function call is not compatible with 'callable' declaration

Last modified: 16 May 2022

Reports the parameters in function calls whose types are not compatible with the ones defined via Closure.

In the following example, the Closure annotation indicates that a returned function expects two integer parameters, while the function call is erroneously provided with the array argument.