Bug report
Closures without an explicit return type aren't checked.
Code snippet that reproduces the problem
https://phpstan.org/r/182afedd-bee5-4b80-9092-9bfca6844b19
Expected output
I'd expect to get an error that the function expects a closure that returns an object.