Reputation: 390
I have a method in a helper class to do some repetitive tasks. I have to pass to it different classes.
Something like
@param Entity $entity || Entity2 $entity etc..
I tried it like this but it sees only first of classes. Others, above in use statment section are unused?
How to do that?
Upvotes: 0
Views: 34
Reputation: 829
You can use a pipe in the docblock like this:
/**
* @param Entity|Entity2 $entity
*/
Upvotes: 1