1

I have a case in PHP psalm that can be represented by this snippet: https://psalm.dev/r/c31997fed4

The handleNode() method does not care about the type of node used, it should only care about that it is a Node. I have not been able to find a combination of @template params to make this snippet pass the psalm validations. Someone who has any idea?

Setting @param TaskNode|ProjectNode is no option in the real-life scenario, then I would have to update 100+ methods all the time with new classes.

Jan Sverre
  • 4,617
  • 1
  • 22
  • 28

0 Answers0