Completed
Push — master ( c1c437...916c2d )
by Sven
24:19
created

FlintRedisCacheFlintstone   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 7
lcom 1
cbo 1
dl 0
loc 40
ccs 12
cts 15
cp 0.8
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 1
A getAll() 0 4 1
A getKeys() 0 4 1
A set() 0 4 1
A delete() 0 4 1
A flush() 0 4 1
A __construct() 0 4 1
1
<?php
2
namespace Suven\FlintRedis;
3
4
use Flintstone\Flintstone;
5
6
class FlintRedisCacheFlintstone implements FlintRedisCache
7
{
8
9
    private $flintstone;
10
11
    public function __construct($realm = 'default', $options = [])
12
    {
13
        $this->flintstone = new Flintstone($realm, $options);
14
    }
15
16 12
    public function get($key)
17
    {
18 12
        return $this->flintstone->get($key);
19
    }
20
21 6
    public function getAll()
22
    {
23 6
        return $this->flintstone->getAll();
24
    }
25
26 12
    public function getKeys()
27
    {
28 12
        return $this->flintstone->getKeys();
29
    }
30
31 18
    public function set($key, $value)
32
    {
33 18
        return $this->flintstone->set($key, $value);
34
    }
35
36 6
    public function delete($key)
37
    {
38 6
        return $this->flintstone->delete($key);
39
    }
40
41 6
    public function flush()
42
    {
43 6
        return $this->flintstone->flush();
44
    }
45
}
46