Completed
Push — master ( 41674c...926a5f )
by Dominik
01:45
created

NullStorageCache::clear()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\Model\StorageCache;
6
7
final class NullStorageCache implements StorageCacheInterface
8
{
9
    /**
10
     * @param string $id
11
     * @param array  $entry
12
     *
13
     * @return StorageCacheInterface
14
     */
15
    public function set(string $id, array $entry): StorageCacheInterface
16
    {
17
        return $this;
18
    }
19
20
    /**
21
     * @param string $id
22
     *
23
     * @return bool
24
     */
25
    public function has(string $id): bool
26
    {
27
        return false;
28
    }
29
30
    /**
31
     * @param string $id
32
     *
33
     * @return array
34
     *
35
     * @throws EntryNotFoundException
36
     */
37
    public function get(string $id)
38
    {
39
        throw EntryNotFoundException::fromId($id);
40
    }
41
42
    /**
43
     * @param string $id
44
     *
45
     * @return StorageCacheInterface
46
     */
47
    public function remove(string $id): StorageCacheInterface
48
    {
49
        return $this;
50
    }
51
52
    /**
53
     * @return StorageCacheInterface
54
     */
55
    public function clear(): StorageCacheInterface
56
    {
57
        return $this;
58
    }
59
}
60