From eee8390be7388d0b625ebfe348dc963cbbf37125 Mon Sep 17 00:00:00 2001 From: Saif Eddin Gmati <29315886+azjezz@users.noreply.github.com> Date: Mon, 29 Mar 2021 07:54:16 +0100 Subject: [PATCH] remove usage of closure generics. (#176) --- src/Psl/Dict/diff.php | 3 --- src/Psl/Dict/diff_by_key.php | 3 --- src/Psl/Dict/intersect.php | 3 --- src/Psl/Dict/intersect_by_key.php | 3 --- src/Psl/Fun/pipe.php | 8 +++----- 5 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/Psl/Dict/diff.php b/src/Psl/Dict/diff.php index 71a20ed..b5635b4 100644 --- a/src/Psl/Dict/diff.php +++ b/src/Psl/Dict/diff.php @@ -30,9 +30,6 @@ function diff(iterable $first, iterable $second, iterable ...$rest): array return array_diff(from_iterable($first), from_iterable($second), ...Vec\map( $rest, /** - * @template Tk of array-key - * @template Tv - * * @param iterable $iterable * * @return array diff --git a/src/Psl/Dict/diff_by_key.php b/src/Psl/Dict/diff_by_key.php index 2bf4f25..5b9d2a1 100644 --- a/src/Psl/Dict/diff_by_key.php +++ b/src/Psl/Dict/diff_by_key.php @@ -30,9 +30,6 @@ function diff_by_key(iterable $first, iterable $second, iterable ...$rest): arra return array_diff_key(from_iterable($first), from_iterable($second), ...Vec\map( $rest, /** - * @template Tk of array-key - * @template Tv - * * @param iterable $iterable * * @return array diff --git a/src/Psl/Dict/intersect.php b/src/Psl/Dict/intersect.php index c82fe1f..f569a24 100644 --- a/src/Psl/Dict/intersect.php +++ b/src/Psl/Dict/intersect.php @@ -30,9 +30,6 @@ function intersect(iterable $first, iterable $second, iterable ...$rest): array return array_intersect(from_iterable($first), from_iterable($second), ...Vec\map( $rest, /** - * @template Tk of array-key - * @template Tv - * * @param iterable $iterable * * @return array diff --git a/src/Psl/Dict/intersect_by_key.php b/src/Psl/Dict/intersect_by_key.php index 3d83405..212ab50 100644 --- a/src/Psl/Dict/intersect_by_key.php +++ b/src/Psl/Dict/intersect_by_key.php @@ -30,9 +30,6 @@ function intersect_by_key(iterable $first, iterable $second, iterable ...$rest): return array_intersect_key(from_iterable($first), from_iterable($second), ...Vec\map( $rest, /** - * @template Tk of array-key - * @template Tv - * * @param iterable $iterable * * @return array diff --git a/src/Psl/Fun/pipe.php b/src/Psl/Fun/pipe.php index 24043f4..eba7752 100644 --- a/src/Psl/Fun/pipe.php +++ b/src/Psl/Fun/pipe.php @@ -36,12 +36,10 @@ function pipe(callable ...$stages): callable return static fn ($input) => reduce( $stages, /** - * @template IO + * @param T $input + * @param (callable(T): T) $next * - * @param IO $input - * @param (callable(IO): IO) $next - * - * @return IO + * @return T */ static fn ($input, callable $next) => $next($input), $input