Bug report
Undefined variables are not detected inside "isset()" + foreach
Code snippet that reproduces the problem
https://phpstan.org/r/98c8d071-a9a6-496a-a7bd-0d5dbe680441
Expected output
ERROR: UndefinedVariable - 10:14 - Cannot find referenced variable $foo