Skip to content

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

Merged
nunomaduro merged 1 commit into
laravel:9.xfrom
fdalcin:9.x
Feb 28, 2022
Merged

[9.x] Improves Support\Collection reduce method type definition#41272
nunomaduro merged 1 commit into
laravel:9.xfrom
fdalcin:9.x

Conversation

@fdalcin

@fdalcin fdalcin commented Feb 28, 2022

Copy link
Copy Markdown
Contributor

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.

2 participants