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()
5555
5656 private function getRedisLock ($ client )
5757 {
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 ());
6460 }
61+
62+ return new PredisRedisLock ($ this ->getPredisClient ());
6563 }
6664
6765 public function getPhpRedisClient ()
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public function it_supports_mysql_strategy()
6666 }
6767
6868 /** @test */
69- public function it_supports_redis_strategy_with_predis_client ()
69+ public function it_supports_redis_strategy_with_predis_client_which_is_default ()
7070 {
7171 $ this ->command ->shouldReceive ('getMutexStrategy ' )->withNoArgs ()->once ()->andReturn ('redis ' );
7272
You can’t perform that action at this time.
0 commit comments