We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8af7a8d commit b2deb50Copy full SHA for b2deb50
src/Collection/ArrayList.php
@@ -532,11 +532,12 @@ final public function mapToDictionary(Closure $closure): array
532
* @template TMapToGroupsValue
533
*
534
* @param Closure(TValue, int): array<TMapToGroupsKey, TMapToGroupsValue> $closure
535
- * @return array<TMapToGroupsKey, IArrayList<TMapToGroupsValue>>
+ * @return array<TMapToGroupsKey, self<TMapToGroupsValue>>
536
*/
537
#[Override]
538
final public function mapToGroups(Closure $closure): array
539
{
540
+ /** @var array<TMapToGroupsKey, array<int, TMapToGroupsValue>> $groups */
541
$groups = $this->mapToDictionary($closure);
542
543
return array_map(static fn ($items) => new self($items), $groups);
0 commit comments