diff --git a/src/Collection/ArrayList.php b/src/Collection/ArrayList.php index 75323a6..3a70cad 100644 --- a/src/Collection/ArrayList.php +++ b/src/Collection/ArrayList.php @@ -532,14 +532,14 @@ final public function mapToDictionary(Closure $closure): array * @template TMapToGroupsValue * * @param Closure(TValue, int): array $closure - * @return array> + * @return array> */ #[Override] final public function mapToGroups(Closure $closure): array { $groups = $this->mapToDictionary($closure); - return array_map(static fn ($items) => new static($items), $groups); + return array_map(static fn ($items) => new self($items), $groups); } #[Override] diff --git a/src/Collection/List/IArrayList.php b/src/Collection/List/IArrayList.php index 4c93354..c18c21b 100644 --- a/src/Collection/List/IArrayList.php +++ b/src/Collection/List/IArrayList.php @@ -220,7 +220,7 @@ public function mapToDictionary(Closure $closure): array; * @template TMapToGroupsValue * * @param Closure(TValue, int): array $closure - * @return array> + * @return array> */ public function mapToGroups(Closure $closure): array;