Skip to content

Commit

Permalink
fix: groupBy update typing information
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 6, 2023
1 parent b5662f4 commit b55fec7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Contract/Operation/GroupByable.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace loophp\collection\Contract\Operation;

use Closure;
use loophp\collection\Contract\Collection;

/**
Expand All @@ -21,9 +20,9 @@ interface GroupByable
*
* @see https://loophp-collection.readthedocs.io/en/stable/pages/api.html#groupby
*
* @param Closure(T, TKey): array-key $callback
* @param callable(T, TKey): array-key $callback
*
* @return Collection<array-key, non-empty-list<T>>
*/
public function groupBy(Closure $callback): Collection;
public function groupBy(callable $callback): Collection;
}
2 changes: 1 addition & 1 deletion src/Operation/GroupBy.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
final class GroupBy extends AbstractOperation
{
/**
* @return Closure(Closure(T, TKey): array-key): Closure(iterable<TKey, T>): Generator<array-key, non-empty-list<T>>
* @return Closure(callable(T, TKey): array-key): Closure(iterable<TKey, T>): Generator<array-key, non-empty-list<T>>
*/
public function __invoke(): Closure
{
Expand Down

0 comments on commit b55fec7

Please sign in to comment.