Skip to content

Commit

Permalink
fix: reduce operation static annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 28, 2022
1 parent 7ad1d09 commit 5c7d401
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Operation/Reduce.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ final class Reduce extends AbstractOperation
/**
* @template V
*
* @return Closure(callable(mixed, mixed, mixed, iterable<mixed, mixed>): mixed): Closure(mixed): Closure(iterable<TKey, T>): Generator<TKey, mixed>
* @return Closure(callable(mixed, mixed, mixed, iterable<mixed, mixed>): mixed): Closure(mixed): Closure(iterable<TKey, T>): Generator<int, mixed>
*/
public function __invoke(): Closure
{
return
/**
* @param callable(V, T, TKey, iterable<TKey, T>): V $callback
*
* @return Closure(V): Closure(iterable<TKey, T>): Generator<TKey, V>
* @return Closure(V): Closure(iterable<TKey, T>): Generator<int, V>
*/
static fn (callable $callback): Closure =>
/**
* @param V $initial
*
* @return Closure(iterable<TKey, T>): Generator<TKey, V>
* @return Closure(iterable<TKey, T>): Generator<int, V>
*/
static fn (mixed $initial): Closure =>
/**
* @param iterable<TKey, T> $iterable
*
* @return Generator<TKey, V>
* @return Generator<int, V>
*/
static fn (iterable $iterable): Generator => yield from new ReduceIterableAggregate($iterable, Closure::fromCallable($callback), $initial);
}
Expand Down

0 comments on commit 5c7d401

Please sign in to comment.