RedisStore::set()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Tequilarapido\TrackIt\Store;
4
5
use Redis;
6
7
class RedisStore implements Store
8
{
9
    public function get($key)
10
    {
11
        return Redis::connection()->get($key);
0 ignored issues
show
Bug introduced by
The method connection() does not exist on Redis. Did you maybe mean connect()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
12
    }
13
14
    public function set($key, $value)
15
    {
16
        Redis::connection()->set($key, $value);
0 ignored issues
show
Bug introduced by
The method connection() does not exist on Redis. Did you maybe mean connect()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
17
    }
18
19
    public function increment($key, $increment = 1)
20
    {
21
        Redis::connection()->incrby($key, $increment);
0 ignored issues
show
Bug introduced by
The method connection() does not exist on Redis. Did you maybe mean connect()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
22
    }
23
24
    public function exists($key)
25
    {
26
        return (bool) Redis::connection()->exists($key);
0 ignored issues
show
Bug introduced by
The method connection() does not exist on Redis. Did you maybe mean connect()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
27
    }
28
}
29