Completed
Pull Request — master (#81)
by Greg
02:12
created

NullCache::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace Consolidation\AnnotatedCommand\Cache;
3
4
/**
5
 * An empty cache that never stores or fetches any objects.
6
 */
7
class NullCache implements SimpleCacheInterface
8
{
9
    /**
10
     * Test for an entry from the cache
11
     * @param string $key
12
     * @return boolean
13
     */
14
    public function has($key)
15
    {
16
        return false;
17
    }
18
19
    /**
20
     * Get an entry from the cache
21
     * @param string $key
22
     * @return array
23
     */
24
    public function get($key)
25
    {
26
        return [];
27
    }
28
29
    /**
30
     * Store an entry in the cache
31
     * @param string $key
32
     * @param array $data
33
     */
34
    public function set($key, $data)
35
    {
36
    }
37
}
38