Predis::rawCommand()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
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