RedisStore   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 22
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 1
A set() 0 4 1
A increment() 0 4 1
A exists() 0 4 1
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