Closed Legion112 closed 1 year ago
Should be something like that
/**
* Reduce the collection to a single value.
* @template TReturn
* @template TInit
* @param callable(TInit, TValue):TReturn $callback
* @param TInit $initial
* @return TReturn
*/
public function reduce(callable $callback, $initial = null);
Hey @Legion112 Which Laravel version do you use? In modern Laravel 9 collections already have right syntax:
/**
* Reduce the collection to a single value.
*
* @template TReduceInitial
* @template TReduceReturnType
*
* @param callable(TReduceInitial|TReduceReturnType, TValue, TKey): TReduceReturnType $callback
* @param TReduceInitial $initial
* @return TReduceReturnType
*/
public function reduce(callable $callback, $initial = null);
Laravel 6 or something
@Legion112
Oh, this is ancient Laravel version. We don't support it anymore, but you are free to create a PR for it. Everything you need:
We will appropriate any help on this repository ❤️
closing as outdated (I highly recommend to use a new version 2.5 of the plugin BTW)
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.