Support question
https://phpstan.org/r/71fa67e2-1d56-48a9-9cc3-35fb7cf110b1
PHP does not support union data types in an argument. Valid data types are described in the annotations, but in reality, the mixed type data comes into the method. Therefore, it is necessary to check in the method code which data type actually came and if an invalid data type came, then throw exception.
I know only one way around this problem is to explicitly indicate in the annotations the data type as a mixed or object if we use argument type hinting.
Is there any other solution to this problem?