Passed
Push — error-message ( b7292a...ff40fa )
by Akihito
04:28 queued 02:25
created

NullCache::doGetStats()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
c 1
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ray\Di;
6
7
use Doctrine\Common\Cache\CacheProvider;
8
9
/**
10
 * @psalm-suppress DeprecatedInterface
11
 * @codeCoverageIgnore
12
 */
13
final class NullCache extends CacheProvider
14
{
15
    /**
16
     * {@inheritDoc}
17
     */
18
    protected function doFetch($id)
19
    {
20
        return false;
21
    }
22
23
    /**
24
     * {@inheritDoc}
25
     */
26
    protected function doContains($id)
27
    {
28
        return false;
29
    }
30
31
    /**
32
     * {@inheritDoc}
33
     */
34
    protected function doSave($id, $data, $lifeTime = 0)
35
    {
36
        return true;
37
    }
38
39
    /**
40
     * {@inheritDoc}
41
     */
42
    protected function doDelete($id)
43
    {
44
        return true;
45
    }
46
47
    /**
48
     * {@inheritDoc}
49
     */
50
    protected function doFlush()
51
    {
52
        return true;
53
    }
54
55
    /**
56
     * {@inheritDoc}
57
     */
58
    protected function doGetStats()
59
    {
60
        return [];
61
    }
62
}
63