diff --git a/src/Contract/Operation/GroupByable.php b/src/Contract/Operation/GroupByable.php index 15488b5c..ff6a4c08 100644 --- a/src/Contract/Operation/GroupByable.php +++ b/src/Contract/Operation/GroupByable.php @@ -4,7 +4,6 @@ namespace loophp\collection\Contract\Operation; -use Closure; use loophp\collection\Contract\Collection; /** @@ -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> */ - public function groupBy(Closure $callback): Collection; + public function groupBy(callable $callback): Collection; } diff --git a/src/Operation/GroupBy.php b/src/Operation/GroupBy.php index 4d782a8d..c49207f3 100644 --- a/src/Operation/GroupBy.php +++ b/src/Operation/GroupBy.php @@ -16,7 +16,7 @@ final class GroupBy extends AbstractOperation { /** - * @return Closure(Closure(T, TKey): array-key): Closure(iterable): Generator> + * @return Closure(callable(T, TKey): array-key): Closure(iterable): Generator> */ public function __invoke(): Closure {