Completed
Push — master ( 9e125a...9a1e57 )
by Kamil
02:25
created

ApiHyperLogTrait::pFCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
ccs 0
cts 4
cp 0
rs 9.4285
nc 1
cc 1
eloc 4
nop 1
crap 2
1
<?php
2
3
namespace Dazzle\Redis\Command\Compose;
4
5
use Dazzle\Redis\Command\Builder;
6
use Dazzle\Redis\Command\Enum;
7
use Dazzle\Redis\Driver\Request;
8
9
trait ApiHyperLogTrait
10
{
11
    /**
12
     * @param Request $request
13
     * @return mixed
14
     */
15
    abstract function dispatch(Request $request);
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
16
17
    /**
18
     * @override
19
     * @inheritDoc
20
     */
21
    public function pFAdd($key, ...$elements)
22
    {
23
        // TODO: Implement pFAdd() method.
24
        $command = Enum::PFADD;
25
        $args = [$key];
26
        $args = array_merge($args, $elements);
27
28
        return $this->dispatch(Builder::build($command, $args));
29
    }
30
31
    /**
32
     * @override
33
     * @inheritDoc
34
     */
35
    public function pFCount(...$keys)
36
    {
37
        // TODO: Implement pFCount() method.
38
        $command = Enum::PFCOUNT;
39
        $args = $keys;
40
41
        return $this->dispatch(Builder::build($command, $args));
42
    }
43
44
    /**
45
     * @override
46
     * @inheritDoc
47
     */
48
    public function pFMerge(array $dsKeyMap)
49
    {
50
        // TODO: Implement pFMerge() method.
51
        $command = Enum::PFMERGE;
52
        $args = $dsKeyMap;
53
54
        return $this->dispatch(Builder::build($command, $args));
55
    }
56
}
57