NullAdapter::keys()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace IQParts\Cache\Adapter;
4
5
final class NullAdapter implements CacheAdapterInterface
6
{
7
8
    /**
9
     * @param string $key
10
     * @return mixed
11
     */
12
    public function get(string $key)
13
    {
14
        return null;
15
    }
16
17
    /**
18
     * @param string $key
19
     * @param $value
20
     * @param int|null $ttl
21
     * @return void
22
     */
23
    public function set(string $key, $value, int $ttl = null): void
24
    {
25
    }
26
27
    /**
28
     * @param string $key
29
     * @return void
30
     */
31
    public function delete(string $key): void
32
    {
33
    }
34
35
    /**
36
     * @param string $key
37
     * @return mixed
38
     */
39
    public function keys($key = '')
40
    {
41
        return [];
42
    }
43
44
    /**
45
     * @param $key
46
     * @return int
47
     */
48
    public function ttl($key): int
49
    {
50
        return 0;
51
    }
52
}