Bug report
A property marked as non-empty-array seems to be incorrectly identified as possibly empty. This is after explicitly checking if the array has at least two items before using unset() on it.
Code snippet that reproduces the problem
https://phpstan.org/r/8d223a39-663d-42ba-803d-1ae7644ded48
Expected output
No errors as the array should have at least one item left.
Did PHPStan help you today? Did it make you happy in any way?
Very happy with PHPStan! Prevented a lot of headaches so far.