Skip to content

Commit b5fa615

Browse files
authored
Merge pull request #1034 from balabis/master
Changed: cast redelivery_delay to int
2 parents 38f6f0c + c14da82 commit b5fa615

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Diff for: pkg/redis/RedisConnectionFactory.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ public function createContext(): Context
8787
if ($this->config['lazy']) {
8888
return new RedisContext(function () {
8989
return $this->createRedis();
90-
}, $this->config['redelivery_delay']);
90+
}, (int) $this->config['redelivery_delay']);
9191
}
9292

93-
return new RedisContext($this->createRedis(), $this->config['redelivery_delay']);
93+
return new RedisContext($this->createRedis(), (int) $this->config['redelivery_delay']);
9494
}
9595

9696
private function createRedis(): Redis
@@ -114,11 +114,7 @@ private function parseDsn(string $dsn): array
114114

115115
$supportedSchemes = ['redis', 'rediss', 'tcp', 'tls', 'unix'];
116116
if (false == in_array($dsn->getSchemeProtocol(), $supportedSchemes, true)) {
117-
throw new \LogicException(sprintf(
118-
'The given scheme protocol "%s" is not supported. It must be one of "%s"',
119-
$dsn->getSchemeProtocol(),
120-
implode('", "', $supportedSchemes)
121-
));
117+
throw new \LogicException(sprintf('The given scheme protocol "%s" is not supported. It must be one of "%s"', $dsn->getSchemeProtocol(), implode('", "', $supportedSchemes)));
122118
}
123119

124120
$database = $dsn->getDecimal('database');

0 commit comments

Comments
 (0)