Skip to content

Commit 0cb2ea8

Browse files
committedSep 8, 2017
ICM: Laravel 5.1 support.
1 parent 075207c commit 0cb2ea8

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed
 

‎src/Mutex.php

+2-12
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use NinjaMutex\Lock\FlockLock;
99
use NinjaMutex\Lock\MemcachedLock;
1010
use NinjaMutex\Lock\MySqlLock;
11-
use NinjaMutex\Lock\PhpRedisLock;
1211
use NinjaMutex\Lock\PredisRedisLock;
1312
use NinjaMutex\Mutex as Ninja;
1413

@@ -41,7 +40,7 @@ public function getStrategy()
4140
);
4241

4342
case 'redis':
44-
return $this->getRedisLock(config('database.redis.client', 'predis'));
43+
return $this->getRedisLock();
4544

4645
case 'memcached':
4746
return new MemcachedLock(Cache::getStore()->getMemcached());
@@ -52,20 +51,11 @@ public function getStrategy()
5251
}
5352
}
5453

55-
private function getRedisLock($client)
54+
private function getRedisLock()
5655
{
57-
if ($client === 'phpredis') {
58-
return new PhpRedisLock($this->getPhpRedisClient());
59-
}
60-
6156
return new PredisRedisLock($this->getPredisClient());
6257
}
6358

64-
public function getPhpRedisClient()
65-
{
66-
return RedisFacade::connection()->client();
67-
}
68-
6959
public function getPredisClient()
7060
{
7161
return RedisFacade::connection();

0 commit comments

Comments
 (0)