-
-
Couldn't load subscription status.
- Fork 146
-
I'm trying to generate
public function getRow(GuardEvent|TransitionEvent $event): Row
but I can't figure out how to add more than one type. I see setType, but not addType or setTypes()
$parameter = $method
->addParameter('event');
$parameter
->setType(GuardEvent::class)
->setType(TransitionEvent::class);
Is there a way to do this? Thx.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Found it! Type::union
$parameter = $method
->addParameter('event');
$parameter
->setType(Type::union(TransitionEvent::class, GuardEvent::class));
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment