From 34910d40cf3b74f78d0e198a9b15c180e841520f Mon Sep 17 00:00:00 2001 From: Aydin Hassan Date: Wed, 19 Oct 2022 11:20:01 +0200 Subject: [PATCH] Phpstan flatmap support --- src/Utils/ArrayObject.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Utils/ArrayObject.php b/src/Utils/ArrayObject.php index 0d7b9549..c5d2fa5b 100644 --- a/src/Utils/ArrayObject.php +++ b/src/Utils/ArrayObject.php @@ -71,8 +71,10 @@ public function filter(callable $callback): self * Run a callable over each item in the array and flatten the results by one level returning a new instance of * `ArrayObject` with the flattened items. * - * @param callable $callback - * @return static + * @template TFlatMapReturn of array + * + * @param callable(T): TFlatMapReturn $callback + * @return static */ public function flatMap(callable $callback): self {