Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
19 | protected function getConnection() |
||
20 | { |
||
21 | $connection = $this->redis->connection($this->connection); |
||
22 | |||
23 | /** @var \Predis\ClientInterface $client */ |
||
24 | $client = $connection->client(); |
||
25 | |||
26 | if ($client instanceof Client) { |
||
27 | // getClientFor is not in the client interface. |
||
28 | return new PredisConnection($client->getClientFor('master')); |
||
29 | } |
||
30 | |||
31 | return $connection; |
||
32 | } |
||
33 | } |
||
34 |