Passed
Push — master ( b2988e...9f380c )
by Jonathan
33:05
created

VoidCache::doSave()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 3
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Doctrine\Common\Cache;
4
5
/**
6
 * Void cache driver. The cache could be of use in tests where you don`t need to cache anything.
7
 *
8
 * @link   www.doctrine-project.org
9
 */
10
class VoidCache extends CacheProvider
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    protected function doFetch($id)
16
    {
17
        return false;
18
    }
19
20
    /**
21
     * {@inheritDoc}
22
     */
23
    protected function doContains($id)
24
    {
25
        return false;
26
    }
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    protected function doSave($id, $data, $lifeTime = 0)
32
    {
33
        return true;
34 4
    }
35
36 4
    /**
37
     * {@inheritDoc}
38
     */
39
    protected function doDelete($id)
40
    {
41
        return true;
42 2
    }
43
44 2
    /**
45
     * {@inheritDoc}
46
     */
47
    protected function doFlush()
48
    {
49
        return true;
50 1
    }
51
52 1
    /**
53
     * {@inheritDoc}
54
     */
55
    protected function doGetStats()
56
    {
57
        return;
58 1
    }
59
}
60