Replies: 1 comment 2 replies
-
There's no way to represent traits in a typesystem for this purpose. You can change the code above to |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Example:
I want to write an extension for
TraitUtil::hasDiContainerTrait
to let phpstan know, if cond is true,$obj
has specific trait. I cannot use interfaces as traits cannot implement them.Beta Was this translation helpful? Give feedback.
All reactions