From 06729d7be3d0045209d2bf6fa434ea3d73899cbe Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 7 Nov 2022 08:33:01 +0100 Subject: [PATCH] fix: `Compare` operation - fix sa New errors were spotted with PSalm 4.30.0. --- src/Contract/Operation/Comparable.php | 2 +- src/Operation/Compare.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Contract/Operation/Comparable.php b/src/Contract/Operation/Comparable.php index 9534e2ed4..1def61d14 100644 --- a/src/Contract/Operation/Comparable.php +++ b/src/Contract/Operation/Comparable.php @@ -24,7 +24,7 @@ interface Comparable * * @template V * - * @param callable(T, T): T $comparator + * @param callable(T, T, TKey, iterable): T $comparator * @param V $default * * @return T|V diff --git a/src/Operation/Compare.php b/src/Operation/Compare.php index d5fc2a0a0..16065ede6 100644 --- a/src/Operation/Compare.php +++ b/src/Operation/Compare.php @@ -16,13 +16,13 @@ final class Compare extends AbstractOperation { /** - * @return Closure(callable(T, T): T): Closure(iterable): Generator + * @return Closure(callable(T, T, TKey, iterable): T): Closure(iterable): Generator */ public function __invoke(): Closure { return /** - * @param callable(T, T): T $comparator + * @param callable(T, T, TKey, iterable): T $comparator * * @return Closure(iterable): Generator */