Skip to content
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

Empty array as parameter default value doesn't work if there are optional keys #3275

Closed
Daeroni opened this issue May 10, 2020 · 2 comments
Closed

Comments

@Daeroni
Copy link
Contributor

Daeroni commented May 10, 2020

Bug report

PHPStan doesn't allow an empty array as default value for a function/method parameter, if the parameter is documented as having all its keys as optional.

Code snippet that reproduces the problem

https://phpstan.org/r/d68246c6-ee90-4cc0-9464-ce59ead0e5ab

Expected output

No errors

@ondrejmirtes
Copy link
Member

Fixed, thank you! phpstan/phpstan-src@a5beb06

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants