diff --git a/src/redis/src/RedisConnection.php b/src/redis/src/RedisConnection.php index 1cef7a3bb..7cb3b3ef6 100644 --- a/src/redis/src/RedisConnection.php +++ b/src/redis/src/RedisConnection.php @@ -37,7 +37,7 @@ class RedisConnection extends BaseConnection implements ConnectionInterface ]; /** - * Current database. + * Current redis database. * @var null|int */ protected $database; @@ -111,7 +111,7 @@ class RedisConnection extends BaseConnection implements ConnectionInterface parent::release(); } - public function setDatabase($database): void + public function setDatabase(?int $database): void { $this->database = $database; } diff --git a/src/redis/tests/Stub/RedisConnectionStub.php b/src/redis/tests/Stub/RedisConnectionStub.php index b0964b3d4..502bf43da 100644 --- a/src/redis/tests/Stub/RedisConnectionStub.php +++ b/src/redis/tests/Stub/RedisConnectionStub.php @@ -58,7 +58,7 @@ class RedisConnectionStub extends RedisConnection /** * @return null|int */ - public function getDatabase() + public function getDatabase(): ?int { return $this->database; }