Best practice way to detect Optional #315
-
I'm having a DTO and need to perform an action on a Currently I check for if (!($dto->collection instanceof Optional)) {
// Do something
} it kind of feels wrong to do it like this. Is there any better way to do this? |
Beta Was this translation helpful? Give feedback.
Answered by
rubenvanassche
Jan 6, 2023
Replies: 1 comment 3 replies
-
I think this is the best way to do this 😄 |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Floppy012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this is the best way to do this 😄