NullCache   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A fetch() 0 3 1
A contains() 0 3 1
A save() 0 1 1
A delete() 0 1 1
A getStats() 0 3 1
A getName() 0 3 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