Bug report
PHPStan reports a false-positive error when calling a variable holding a closure on its own line. The analyzer incorrectly believes the invocation is a no-op expression rather than a function call that may have side effects (e.g. output).
Code snippet that reproduces the problem
https://phpstan.org/r/38fa9abe-cdc6-4ffa-b509-783d834a0f3c
Expected output
It was a false positive.
Did PHPStan help you today? Did it make you happy in any way?
No response