Summary of a problem or a feature request
It seems like PhpStan does not be aware of calling unset on an associative array element and therefore shows an error when checking the size of the changed array.
Code snippet that reproduces the problem
https://phpstan.org/r/0eb513bd-e2db-4077-a40e-0dbce81ba441
Expected output
No error.