-
Hello ! I've this code :
I wonder, is this possible to enforce the For example, here is my
|
Beta Was this translation helpful? Give feedback.
Answered by
canvural
Jan 16, 2024
Replies: 1 comment 1 reply
-
Not sure how advisable it is, but you can typehint it as See here: https://phpstan.org/r/69b0e6d5-52c4-46d2-b8a4-0883e9fdb40e |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Androlax2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure how advisable it is, but you can typehint it as
Request&object{first_name: string, last_name: string, phone_number: string|null}
.See here: https://phpstan.org/r/69b0e6d5-52c4-46d2-b8a4-0883e9fdb40e