Added database type.

This commit is contained in:
李铭昕 2019-07-02 18:48:53 +08:00
parent 3521d4d2f9
commit 8e01b1f994
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -58,7 +58,7 @@ class RedisConnectionStub extends RedisConnection
/**
* @return null|int
*/
public function getDatabase()
public function getDatabase(): ?int
{
return $this->database;
}