AbstractCacheDriver   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 46
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfig() 0 3 1
A getConfigKey() 0 3 2
A getKeys() 0 3 1
1
<?php
2
3
namespace MidasSoft\DominicanBankParser\Cache;
4
5
use MidasSoft\DominicanBankParser\Interfaces\CacheInterface;
6
7
abstract class AbstractCacheDriver implements CacheInterface
8
{
9
    /**
10
     * The config of the driver.
11
     *
12
     * @var array
13
     */
14
    protected $config;
15
16
    /**
17
     * The keys of the cached values.
18
     *
19
     * @var array
20
     */
21
    protected $keys;
22
23
    /**
24
     * Returns the config property.
25
     *
26
     * @return array
27
     */
28
    public function getConfig()
29
    {
30
        return $this->config;
31
    }
32
33
    /**
34
     * Returns the value for some config entry.
35
     *
36
     * @param string $key
37
     *
38
     * @return mixed|null
39
     */
40 8
    public function getConfigKey($key)
41
    {
42 8
        return isset($this->config[$key]) ? $this->config[$key] : null;
43
    }
44
45
    /**
46
     * Returns the keys property.
47
     *
48
     * @return array
49
     */
50 1
    public function getKeys()
51
    {
52 1
        return $this->keys;
53
    }
54
}
55