-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Description
Bug report
The question is if stream_context_get_params() returns an array with key options for sure, or not.
PHPStan says no: https://phpstan.org/r/d7e17de1-65c5-412f-bcd1-ce04b797a1f3
Psalm says yes: https://psalm.dev/r/84991be58a
I submitted a PR for PHP docs to include false as possible return type, but it got rejected (at least for PHP 8+): php/doc-en#3824
So putting all this together, I think you should adjust the signature of stream_context_get_params() to always output options (which is an array too).
Code snippet that reproduces the problem
No response
Expected output
No issue.
Did PHPStan help you today? Did it make you happy in any way?
Yes! :-)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels