mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-04 04:37:46 +08:00
Added database type.
This commit is contained in:
parent
3521d4d2f9
commit
8e01b1f994
@ -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;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ class RedisConnectionStub extends RedisConnection
|
||||
/**
|
||||
* @return null|int
|
||||
*/
|
||||
public function getDatabase()
|
||||
public function getDatabase(): ?int
|
||||
{
|
||||
return $this->database;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user