Format code.

This commit is contained in:
李铭昕 2019-07-02 17:57:08 +08:00
parent 01de6efc2c
commit 50c8c644ff
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ class RedisConnection extends BaseConnection implements ConnectionInterface
$this->connection = $redis;
$this->lastUseTime = microtime(true);
$this->setDbChanged(false);
return true;
}
@ -99,6 +99,7 @@ class RedisConnection extends BaseConnection implements ConnectionInterface
if ($this->dbChanged) {
// Select the origin db after execute select.
$this->select($this->config['db'] ?? 0);
$this->setDbChanged(false);
}
parent::release();
}

View File

@ -19,7 +19,6 @@ use Hyperf\Redis\Pool\PoolFactory;
use Hyperf\Redis\Pool\RedisPool;
use Hyperf\Redis\Redis;
use Hyperf\Utils\ApplicationContext;
use Hyperf\Utils\Context;
use HyperfTest\Redis\Stub\RedisPoolStub;
use Mockery;
use PHPUnit\Framework\TestCase;