From 8e01b1f9942c3c0e2112799ce017fd1e2cf3b40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Tue, 2 Jul 2019 18:48:53 +0800 Subject: [PATCH] Added database type. --- src/redis/src/RedisConnection.php | 4 ++-- src/redis/tests/Stub/RedisConnectionStub.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }