Predis   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A rawCommand() 0 4 1
A getClient() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Redislabs\RedisClient;
5
6
use Redislabs\Interfaces\RedisClientInterface;
7
use Predis\Client as RedisClient;
8
9
final class Predis implements RedisClientInterface
10
{
11
    private $redisClient;
12
13
    public function __construct(RedisClient $redisClient)
14
    {
15
        $this->redisClient = $redisClient;
16
    }
17
18
    public function getClient() : RedisClient
19
    {
20
        return $this->redisClient;
21
    }
22
23
    public function rawCommand(string $command, array $arguments)
24
    {
25
        array_unshift($arguments, $command);
26
        return $this->redisClient->executeRaw($arguments);
27
    }
28
}
29