How to specify a template type will be unused in a Result type class? #10667
-
I'm trying to model a I'm able to get 90% of the way to a solution. However, the problem is that when constructing either the Ok or the Error variant of a Result I don't have a way to tell PHPStan "This template value is never used". This is what I've been able to create https://phpstan.org/r/e9c7213e-b7ad-47f8-93b4-ec19e479b688 How would I indicate for If it helps from a conceptual standpoint: in other languages a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
There is more than one way how to model Result/Ok/Error. For example: https://phpstan.org/r/55b876e9-566c-4815-9d19-132cfbf84254 |
Beta Was this translation helpful? Give feedback.
There is more than one way how to model Result/Ok/Error. For example: https://phpstan.org/r/55b876e9-566c-4815-9d19-132cfbf84254