Laravel Version
11.38.1
PHP Version
8.3.10
Database Driver & Version
No response
Description
When you call collapseWithKeys function on an empty Collection you get the Errormessage
ArgumentCountError array_replace() expects at least 1 argument, 0 given.
I would expect it similar to the collect([])->collapse() to return an empty collection.
Steps To Reproduce
php artisan tinker
collect([])->collapseWithKeys()