Skip to content

Commit 6e4cf6f

Browse files
committed
use an array map instead
1 parent e509cdf commit 6e4cf6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Illuminate/Cache/DynamoDbStore.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Aws\DynamoDb\Exception\DynamoDbException;
77
use Illuminate\Contracts\Cache\LockProvider;
88
use Illuminate\Contracts\Cache\Store;
9+
use Illuminate\Support\Arr;
910
use Illuminate\Support\Carbon;
1011
use Illuminate\Support\Collection;
1112
use Illuminate\Support\InteractsWithTime;
@@ -113,7 +114,7 @@ public function many(array $keys)
113114
$now = Carbon::now();
114115

115116
return array_merge(
116-
(new Collection($keys))->mapWithKeys(fn ($key) => [$key => null])->all(),
117+
Arr::mapWithKeys($keys, fn ($key) => [$key => null]),
117118
(new Collection($response['Responses'][$this->table]))->mapWithKeys(function ($response) use ($now) {
118119
if ($this->isExpired($response, $now)) {
119120
$value = null;

0 commit comments

Comments
 (0)