force type for connection parameter

This commit is contained in:
Julien Fastré 2021-04-27 23:20:49 +02:00 committed by Pol Dellaiera
parent f6cf0dba2f
commit 8b51bfbaf5

View File

@ -26,23 +26,23 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
*/
class RedisConnectionFactory implements EventSubscriberInterface
{
protected $host;
protected $port;
protected $timeout;
protected string $host;
protected int $port;
/**
*
* @var Redis
*/
protected $redis;
protected ChillRedis $redis;
protected int $timeout;
public function __construct($parameters)
{
$this->host = $parameters['host'];
$this->port = $parameters['port'];
$this->timeout = $parameters['timeout'];
$this->port = (int) $parameters['port'];
$this->timeout = (int) $parameters['timeout'];
}