Code snippet here:
https://phpstan.org/r/37400131-6bac-49dd-9088-5fa3614957bf
The variable is "always true" and "might not be defined" at the same time, which doesn't make any sense to me. Without the "foreach" phpstan handles the code correctly.
P.S.: Thank You for awesome tool (phpstan), which helps me with refactoring legacy code a lot.
Code snippet here:
https://phpstan.org/r/37400131-6bac-49dd-9088-5fa3614957bf
The variable is "always true" and "might not be defined" at the same time, which doesn't make any sense to me. Without the "foreach" phpstan handles the code correctly.
P.S.: Thank You for awesome tool (phpstan), which helps me with refactoring legacy code a lot.