Bug report
Parameters passed by ref acquire mixed type. The type should be taken from the method/function signature.
Code snippet that reproduces the problem
https://phpstan.org/r/ddd38952-fe62-4dc4-9d13-ed9aa83ca89c
Expected output
Type = array, error reported for array to string conversion.
This is covered by psalm: https://psalm.dev/r/82e99bda64
Also, there is @param-out annotation that allows to specify the result type.