File tree Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change 1111use NinjaMutex \Lock \PhpRedisLock ;
1212use NinjaMutex \Lock \PredisRedisLock ;
1313use NinjaMutex \Mutex as Ninja ;
14- use Predis \Client as PredisClient ;
1514
1615class Mutex
1716{
@@ -69,12 +68,7 @@ public function getPhpRedisClient()
6968
7069 public function getPredisClient ()
7170 {
72- $ connection = RedisFacade::connection ();
73-
74- /* @laravel-versions */
75- $ predisClient = ($ connection instanceof PredisClient) ? $ connection : $ connection ->client ();
76-
77- return $ predisClient ;
71+ return RedisFacade::connection ()->client ();
7872 }
7973
8074 public function __call ($ method , $ parameters )
Original file line number Diff line number Diff line change 33namespace Illuminated \Console \ConsoleMutex \Tests ;
44
55use GenericCommand ;
6- use Illuminate \Redis \Connectors \PhpRedisConnector ;
76use Illuminate \Support \Facades \Cache ;
87use Illuminated \Console \Mutex ;
98use Mockery ;
@@ -79,11 +78,6 @@ public function it_supports_redis_strategy_with_predis_client_which_is_default()
7978 /** @test */
8079 public function it_supports_redis_strategy_with_phpredis_client ()
8180 {
82- /* @laravel-versions */
83- if (!class_exists (PhpRedisConnector::class)) {
84- return ;
85- }
86-
8781 config (['database.redis.client ' => 'phpredis ' ]);
8882
8983 $ this ->command ->shouldReceive ('getMutexStrategy ' )->withNoArgs ()->once ()->andReturn ('redis ' );
@@ -103,11 +97,6 @@ public function it_has_get_predis_client_method_which_always_returns_an_instance
10397 /** @test */
10498 public function it_has_get_phpredis_client_method_which_always_returns_an_instance_of_redis_class ()
10599 {
106- /* @laravel-versions */
107- if (!class_exists (PhpRedisConnector::class)) {
108- return ;
109- }
110-
111100 config (['database.redis.client ' => 'phpredis ' ]);
112101
113102 $ mutex = new Mutex ($ this ->command );
You can’t perform that action at this time.
0 commit comments