Bug report
foreach iteration over array_keys($arr) should make phpstan aware of the offset
inspired on phpunit code
Code snippet that reproduces the problem
https://phpstan.org/r/6e491e13-b991-4e49-88d1-2e8e03c4b8ba
Expected output
no error on line 8
Did PHPStan help you today? Did it make you happy in any way?
No response