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

[9.x] Improves Support\Collection reduce method type definition #41272

Merged
merged 1 commit into from
Feb 28, 2022
Merged

[9.x] Improves Support\Collection reduce method type definition #41272

merged 1 commit into from
Feb 28, 2022

Conversation

fdalcin
Copy link
Contributor

@fdalcin fdalcin commented Feb 28, 2022

This PR improves reduce() types because it passes the key to the closure.

Whenever the reduce callback expects the third parameter static analysis fail because the type is not defined which produces the following error.
image

This was covered here #40813 but it was sent to master instead -- 9.x was not released at the time.

@nunomaduro nunomaduro merged commit 1a1c140 into laravel:9.x Feb 28, 2022
@fdalcin fdalcin deleted the 9.x branch February 28, 2022 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants