Template string as object or array of object

206 Views Asked by At

I'm currently trying to fix the annotations of a function of my project that looks like this :

https://psalm.dev/r/7b974e8822

However, it always refuse something like A::class . '[]' as a class-string and would like only a string. But doing so I lose my type hint. How should I do it ?

I actually don't know if I missed something in Psalm documentation or if I should open an issue to support it. I'm have to use this because of symfony serializer. I know I can still force it, but I would like to find the way to make it work in a proper way. Psalm support in phpdoc B[] so I see no reason to not support it as a param value.

0

There are 0 best solutions below