Skip to content

PHPStan dynamic property on general class #10450

Answered by canvural
Androlax2 asked this question in Support
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Androlax2
Comment options

Answer selected by Androlax2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants