Redis   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 3 1
A __construct() 0 3 1
A rawCommand() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Redislabs\RedisClient;
5
6
use Redislabs\Interfaces\RedisClientInterface;
7
use Redis as RedisClient;
8
9
final class Redis 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
        return $this->redisClient->rawCommand($command, ...$arguments);
0 ignored issues
show
Bug introduced by
$arguments is expanded, but the parameter $arguments of Redis::rawCommand() does not expect variable arguments. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

25
        return $this->redisClient->rawCommand($command, /** @scrutinizer ignore-type */ ...$arguments);
Loading history...
26
    }
27
}
28