@@ -24,7 +24,7 @@ public function __construct(array $config)
24
24
25
25
public function getConnectionIdsForChannel (string ...$ channels ): Collection
26
26
{
27
- $ promises = collect ($ channels )->map (fn ($ channel ) => $ this ->dynamoDb ->queryAsync ([
27
+ $ promises = collect ($ channels )->map (fn ($ channel ) => $ this ->dynamoDb ->queryAsync ([
28
28
'TableName ' => $ this ->table ,
29
29
'IndexName ' => 'lookup-by-channel ' ,
30
30
'KeyConditionExpression ' => 'channel = :channel ' ,
@@ -36,8 +36,8 @@ public function getConnectionIdsForChannel(string ...$channels): Collection
36
36
$ responses = Utils::all ($ promises )->wait ();
37
37
38
38
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 ' ])
41
41
->unique ();
42
42
}
43
43
@@ -55,7 +55,7 @@ public function clearConnection(string $connectionId): void
55
55
if (! empty ($ response ['Items ' ])) {
56
56
$ this ->dynamoDb ->batchWriteItem ([
57
57
'RequestItems ' => [
58
- $ this ->table => collect ($ response ['Items ' ])->map (fn ($ item ) => [
58
+ $ this ->table => collect ($ response ['Items ' ])->map (fn ($ item ) => [
59
59
'DeleteRequest ' => [
60
60
'Key ' => Arr::only ($ item , ['connectionId ' , 'channel ' ]),
61
61
],
0 commit comments