NullCache::fetch()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Onoi\Cache;
4
5
/**
6
 * @license GNU GPL v2+
7
 * @since 1.1
8
 *
9
 * @author mwjames
10
 */
11
class NullCache implements Cache {
12
13
	/**
14
	 * @since  1.1
15
	 *
16
	 * {@inheritDoc}
17
	 */
18 1
	public function fetch( $id ) {
19 1
		return false;
20
	}
21
22
	/**
23
	 * @since  1.1
24
	 *
25
	 * {@inheritDoc}
26
	 */
27 3
	public function contains( $id ) {
28 3
		return false;
29
	}
30
31
	/**
32
	 * @since  1.1
33
	 *
34
	 * {@inheritDoc}
35
	 */
36
	public function save( $id, $data, $ttl = 0 ) {}
37
38
	/**
39
	 * @since  1.1
40
	 *
41
	 * {@inheritDoc}
42
	 */
43
	public function delete( $id ) {}
44
45
	/**
46
	 * @since  1.1
47
	 *
48
	 * {@inheritDoc}
49
	 */
50 1
	public function getStats() {
51 1
		return array();
52
	}
53
54
	/**
55
	 * @since  1.2
56
	 *
57
	 * {@inheritDoc}
58
	 */
59 1
	public function getName() {
60 1
		return '';
61
	}
62
63
}
64