This commit is contained in:
2020-12-17 14:09:14 +08:00
parent 672a719dbd
commit 36c1d0502a
151 changed files with 1937 additions and 2848 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ class Redis extends Component
* @return mixed
* @throws
*/
public function __call($name, $arguments)
public function __call($name, $arguments): mixed
{
if (method_exists($this, $name)) {
$data = $this->{$name}(...$arguments);
@@ -82,7 +82,7 @@ SCRIPT;
* @return int
* @throws Exception
*/
public function unlock($key)
public function unlock($key): int
{
$redis = $this->proxy();
return $redis->del($key);
@@ -113,7 +113,7 @@ SCRIPT;
* @return \Redis
* @throws Exception
*/
public function proxy()
public function proxy(): \Redis
{
$connections = Snowflake::app()->pool->redis;