Skip to content

Commit

Permalink
支持cask迁移
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Mar 9, 2020
1 parent af3b80d commit 0203ad4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function register(string $name, RedisConfig $config,?string $cask = null): PoolC
}
if($cask){
$ref = new \ReflectionClass($cask);
if((!$ref->isSubclassOf(RedisClient::class)) || (!$ref->isSubclassOf(RedisCluster::class))){
if((!$ref->isSubclassOf(RedisClient::class)) && (!$ref->isSubclassOf(RedisCluster::class))){
throw new Exception("cask {$cask} not a sub class of EasySwoole\Redis\Redis or EasySwoole\Redis\RedisCluster");
}
}
Expand Down

0 comments on commit 0203ad4

Please sign in to comment.