### Feature request https://phpstan.org/r/847f855b-835a-4ff6-b466-e4b30717076f ```php /** @param list<mixed> $arr */ function foo(array $arr): void { foreach ($arr as $v) { bar($arr); } for ($i = 0; $i < count($arr); ++$i) { bar($arr); } } /** @param non-empty-list<mixed> $arr */ function bar(array $arr): void {} ``` Inside the `foreach` loop `$arr` can not be empty. It already works when using a `for` loop instead of `foreach`. ### Did PHPStan help you today? Did it make you happy in any way? _No response_
Feature request
https://phpstan.org/r/847f855b-835a-4ff6-b466-e4b30717076f
Inside the
foreachloop$arrcan not be empty.It already works when using a
forloop instead offoreach.Did PHPStan help you today? Did it make you happy in any way?
No response