-
Notifications
You must be signed in to change notification settings - Fork 534
Expose default values for native functions/methods #1261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e992f3c
to
570e366
Compare
use function PHPStan\Testing\assertType; | ||
|
||
function () { | ||
assertType('ArrayObject<*NEVER*, *NEVER*>', new \ArrayObject()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't ideal but matches the behavior with the actual default value passed (which is the next line)
Hmm, obviously this won't work for PHP<8 :/ |
Oh, you have no idea what you’ve signed up for 😊 This will unblock multiple nice things but I have to do sime preliminary work first and then I’ll get back to you 😊 |
FYI @rvanvelzen I'm aware of your many PRs you sent in the last 24 hours, but I first want to finish my promise of the work needed for this area, and then I'll look at the other PRs :) |
@ondrejmirtes no worries, it gives me enough time to work on implementing |
Alright, doing as promised, here's the description of what I want from you: #1276 (comment) Thanks :) |
Superseded by #1300 |
This should help getting #1244 over the finish line