mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
force type for connection parameter
This commit is contained in:
parent
40dda65006
commit
58047faac6
@ -18,22 +18,22 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||||||
|
|
||||||
class RedisConnectionFactory implements EventSubscriberInterface
|
class RedisConnectionFactory implements EventSubscriberInterface
|
||||||
{
|
{
|
||||||
protected $host;
|
protected string $host;
|
||||||
|
|
||||||
protected $port;
|
protected int $port;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Redis
|
* @var Redis
|
||||||
*/
|
*/
|
||||||
protected $redis;
|
protected ChillRedis $redis;
|
||||||
|
|
||||||
protected $timeout;
|
protected int $timeout;
|
||||||
|
|
||||||
public function __construct($parameters)
|
public function __construct($parameters)
|
||||||
{
|
{
|
||||||
$this->host = $parameters['host'];
|
$this->host = $parameters['host'];
|
||||||
$this->port = $parameters['port'];
|
$this->port = (int) $parameters['port'];
|
||||||
$this->timeout = $parameters['timeout'];
|
$this->timeout = (int) $parameters['timeout'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user