Skip to content

Commit 3c65ee8

Browse files
committed
Pass a Redis instance or an array with host, port and options
1 parent f2ee4dc commit 3c65ee8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/JuanF/Lib/Persistence/PersistenceInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ interface PersistenceInterface
2424

2525
/**
2626
* Init backend
27-
* @param array $config Optional
27+
* @param mixed $params Optional
2828
*/
29-
static function init($config = null);
29+
static function init($params = null);
3030

3131
/**
3232
* Get the given bits for the key.

src/JuanF/Lib/Persistence/Redis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static function init($params)
4141
self::$port = isset($params['port']) ? $params['port'] : self::$port;
4242
}
4343

44-
if (!(self::$redisInstance instanceof Redis)) {
44+
if (!(self::$redisInstance instanceof \Redis)) {
4545
self::$redisInstance = new \Redis();
4646
self::$redisInstance->connect(self::$host, self::$port);
4747
self::$redisInstance->setOption(\Redis::OPT_SERIALIZER, \Redis::SERIALIZER_PHP);

0 commit comments

Comments
 (0)