Skip to content

Commit 6488a89

Browse files
committed
fix: try to fix psalm again
1 parent 06efc01 commit 6488a89

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Factory/PhpredisClientFactory.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@ private function createRedisArrayClient(array $dsns, string $class, string $alia
155155
}
156156

157157
try {
158-
$client = new RedisArray($hosts, $redisArrayOptions);
159-
} catch (RedisException $e) {
160-
throw new RedisException(sprintf('Failed to create RedisArray with hosts %s: %s', implode(', ', $hosts), $e->getMessage()), 0, $e);
158+
/** @var list<string> $hostsList */
159+
$hostsList = array_map('strval', $hosts);
160+
$client = new RedisArray($hostsList, $redisArrayOptions);
161+
} catch (\RedisException $e) {
162+
throw new \RedisException(sprintf('Failed to create RedisArray with hosts %s: %s', implode(', ', $hosts), $e->getMessage()), 0, $e);
161163
}
162164

163165
$connectedHosts = $client->getHosts();
@@ -422,7 +424,7 @@ private function loadSlaveFailoverType(string $type): int
422424
*
423425
* @return T
424426
*
425-
* @template T of Redis|RedisCluster|Relay
427+
* @template T of Redis|RedisArray|RedisCluster|Relay
426428
*/
427429
private function createLoggingProxy(object $client, string $alias): object
428430
{

0 commit comments

Comments
 (0)