phpstan
phpstan copied to clipboard
Missing parameter and return typehints not reported on Closures
Bug report
I would have expected that missing typehints for parameters and return types would be required at some level (probably the same normal functions, but would okay with a higher level).
Code snippet that reproduces the problem
$b = function($b) {
return 'B';
};
https://phpstan.org/r/dd90e502-6f07-46f9-a935-921e7720b5a0
Expected output
I would expect it complain about missing typehints on Closure, similar to what it does for a normal function.