@@ -24,7 +24,7 @@ public function __construct(array $config)
2424
2525 public function getConnectionIdsForChannel (string ...$ channels ): Collection
2626 {
27- $ promises = collect ($ channels )->map (fn ($ channel ) => $ this ->dynamoDb ->queryAsync ([
27+ $ promises = collect ($ channels )->map (fn ($ channel ) => $ this ->dynamoDb ->queryAsync ([
2828 'TableName ' => $ this ->table ,
2929 'IndexName ' => 'lookup-by-channel ' ,
3030 'KeyConditionExpression ' => 'channel = :channel ' ,
@@ -36,8 +36,8 @@ public function getConnectionIdsForChannel(string ...$channels): Collection
3636 $ responses = Utils::all ($ promises )->wait ();
3737
3838 return collect ($ responses )
39- ->flatmap (fn ( $ result ) => $ result ['Items ' ])
40- ->map (fn ( $ item ) => $ item ['connectionId ' ]['S ' ])
39+ ->flatmap (fn ( array $ result ): array => $ result ['Items ' ])
40+ ->map (fn ( array $ item ): string => $ item ['connectionId ' ]['S ' ])
4141 ->unique ();
4242 }
4343
@@ -55,7 +55,7 @@ public function clearConnection(string $connectionId): void
5555 if (! empty ($ response ['Items ' ])) {
5656 $ this ->dynamoDb ->batchWriteItem ([
5757 'RequestItems ' => [
58- $ this ->table => collect ($ response ['Items ' ])->map (fn ($ item ) => [
58+ $ this ->table => collect ($ response ['Items ' ])->map (fn ($ item ) => [
5959 'DeleteRequest ' => [
6060 'Key ' => Arr::only ($ item , ['connectionId ' , 'channel ' ]),
6161 ],
0 commit comments