File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,11 @@ public function getStrategy()
55
55
56
56
private function getRedisLock ($ client )
57
57
{
58
- switch ($ client ) {
59
- case 'phpredis ' :
60
- return new PhpRedisLock ($ this ->getPhpRedisClient ());
61
-
62
- case 'predis ' :
63
- return new PredisRedisLock ($ this ->getPredisClient ());
58
+ if ($ client === 'phpredis ' ) {
59
+ return new PhpRedisLock ($ this ->getPhpRedisClient ());
64
60
}
61
+
62
+ return new PredisRedisLock ($ this ->getPredisClient ());
65
63
}
66
64
67
65
public function getPhpRedisClient ()
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public function it_supports_mysql_strategy()
66
66
}
67
67
68
68
/** @test */
69
- public function it_supports_redis_strategy_with_predis_client ()
69
+ public function it_supports_redis_strategy_with_predis_client_which_is_default ()
70
70
{
71
71
$ this ->command ->shouldReceive ('getMutexStrategy ' )->withNoArgs ()->once ()->andReturn ('redis ' );
72
72
You can’t perform that action at this time.
0 commit comments