VoidCache::doFlush()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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 4
    protected function doFetch($id)
16
    {
17 4
        return false;
18
    }
19
20
    /**
21
     * {@inheritDoc}
22
     */
23 2
    protected function doContains($id)
24
    {
25 2
        return false;
26
    }
27
28
    /**
29
     * {@inheritDoc}
30
     */
31 1
    protected function doSave($id, $data, $lifeTime = 0)
32
    {
33 1
        return true;
34
    }
35
36
    /**
37
     * {@inheritDoc}
38
     */
39 1
    protected function doDelete($id)
40
    {
41 1
        return true;
42
    }
43
44
    /**
45
     * {@inheritDoc}
46
     */
47 1
    protected function doFlush()
48
    {
49 1
        return true;
50
    }
51
52
    /**
53
     * {@inheritDoc}
54
     */
55 1
    protected function doGetStats()
56
    {
57 1
        return;
58
    }
59
}
60