Commit 829394f
[12.x] collapseWithKeys - Prevent exception in base case (#56002)
* collapseWithKeys - Ensure base case of already flat collection doesn't result in an exception.
* 12.x Fix style error
* 12.x Opting to return empty collection in this case instead to ensure functionality of Collection matches LazyCollection
---------
Co-authored-by: Dean Wunder <[email protected]>1 parent 4f4d556 commit 829394f
File tree
2 files changed
+8
-0
lines changed- src/Illuminate/Collections
- tests/Support
2 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1772 | 1772 | | |
1773 | 1773 | | |
1774 | 1774 | | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
1775 | 1779 | | |
1776 | 1780 | | |
1777 | 1781 | | |
| |||
0 commit comments