framework icon indicating copy to clipboard operation
framework copied to clipboard

[9.x] Added generic typing to EnumeratesValues::flatMap method.

Open mad-briller opened this issue 3 years ago • 2 comments

Improves the generic typing of EnumeratesValues by providing them for the flatMap() method.

Using flatMap right now causes all type information to be lost, and explicitly states there will only be integer keys, when collapse() can produce both string and int keys thanks to it's use of array_merge().

ref: https://github.com/nunomaduro/larastan/discussions/1427

mad-briller avatar Oct 28 '22 11:10 mad-briller

Enumerable interface needs to be changed also.

canvural avatar Oct 28 '22 11:10 canvural

@nunomaduro can you take a look at this?

taylorotwell avatar Nov 01 '22 13:11 taylorotwell