Bug report
array_filter(
$array,
fn ($entry) => /* some boolean return value */
);
this code will produce the false positive error
Anonymous function should return false but returns bool.
(I also get it with "should return true" sometimes)
Not sure if the issue is related to instanceof usage in the callback
Code snippet that reproduces the problem
https://phpstan.org/r/bfbf5329-3ba0-412a-ae79-cdfc01d54886
Expected output
It should pass (not detect anything), as the array_filter callback should return bool and not true xor false.