Completed
Push — 2.0 ( b22aa0...07e083 )
by Marco
11:24 queued 07:13
created

Vacuum   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 100
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 90%

Importance

Changes 0
Metric Value
wmc 11
lcom 0
cbo 1
dl 0
loc 100
ccs 18
cts 20
cp 0.9
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 1 1
A test() 0 5 1
A get() 0 5 1
A set() 0 5 1
A delete() 0 5 1
A clear() 0 5 1
A getMultiple() 0 5 1
A setMultiple() 0 5 1
A deleteMultiple() 0 5 1
A has() 0 5 1
A stats() 0 5 1
1
<?php namespace Comodojo\Cache\Drivers;
2
3
/**
4
 * @package     Comodojo Cache
5
 * @author      Marco Giovinazzi <[email protected]>
6
 * @license     MIT
7
 *
8
 * LICENSE:
9
 *
10
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
16
 * THE SOFTWARE.
17
 */
18
19
class Vacuum extends AbstractDriver {
20
21
    const DRIVER_NAME = "vacuum";
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function __construct(array $configuration = []) {}
27
28
        /**
29
         * {@inheritdoc}
30
         */
31 86
        public function test() {
32
33 86
        return true;
34
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40 5
    public function get($key, $namespace) {
41
42 5
        return null;
43
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49 4
    public function set($key, $namespace, $value, $ttl = null) {
50
51 4
        return true;
52
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58 3
    public function delete($key, $namespace) {
59
60 3
        return false;
61
62
    }
63
64
    /**
65
     * {@inheritdoc}
66
     */
67 2
    public function clear($namespace = null) {
68
69 2
        return true;
70
71
    }
72
73
    /**
74
     * {@inheritdoc}
75
     */
76 1
    public function getMultiple(array $keys, $namespace) {
77
78 1
        return array_combine($keys, array_fill(0, count($keys), null));
79
80
    }
81
82
    /**
83
     * {@inheritdoc}
84
     */
85 1
    public function setMultiple(array $key_values, $namespace, $ttl = null) {
86
87 1
        return true;
88
89
    }
90
91
    /**
92
     * {@inheritdoc}
93
     */
94 1
    public function deleteMultiple(array $keys, $namespace) {
95
96 1
        return false;
97
98
    }
99
100
    /**
101
     * {@inheritdoc}
102
     */
103 4
    public function has($key, $namespace) {
104
105 4
        return false;
106
107
    }
108
109
    /**
110
     * {@inheritdoc}
111
     */
112
    public function stats() {
113
114
        return [];
115
116
    }
117
118
}
119