NullAdapter   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 37
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 1
A set() 0 4 1
A delete() 0 4 1
1
<?php
2
namespace Genkgo\Cache\Adapter;
3
4
use Genkgo\Cache\CacheAdapterInterface;
5
6
/**
7
 * Class NullAdapter
8
 * @package Genkgo\Cache\Handler
9
 */
10
class NullAdapter implements CacheAdapterInterface
11
{
12
    /**
13
     * Gets a cache entry
14
     * returning null if not in cache
15
     *
16
     * @param $key
17
     * @return null|mixed
18
     */
19 3
    public function get($key)
20
    {
21 3
        return null;
22
    }
23
24
    /**
25
     * Sets a cache entry
26
     *
27
     * @param $key
28
     * @param $value
29
     * @return void
30
     */
31 1
    public function set($key, $value)
32
    {
33 1
        return;
34
    }
35
36
    /**
37
     * Deletes a cache entry
38
     *
39
     * @param $key
40
     * @return void
41
     */
42 1
    public function delete($key)
43
    {
44 1
        return;
45
    }
46
}
47