NullStorageCache::remove()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 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 1
    public function set(string $id, array $entry): StorageCacheInterface
16
    {
17 1
        return $this;
18
    }
19
20
    /**
21
     * @param string $id
22
     *
23
     * @return bool
24
     */
25 2
    public function has(string $id): bool
26
    {
27 2
        return false;
28
    }
29
30
    /**
31
     * @param string $id
32
     *
33
     * @return array
34
     *
35
     * @throws EntryNotFoundException
36
     */
37 2
    public function get(string $id)
38
    {
39 2
        throw EntryNotFoundException::fromId($id);
40
    }
41
42
    /**
43
     * @param string $id
44
     *
45
     * @return StorageCacheInterface
46
     */
47 1
    public function remove(string $id): StorageCacheInterface
48
    {
49 1
        return $this;
50
    }
51
52
    /**
53
     * @return StorageCacheInterface
54
     */
55 1
    public function clear(): StorageCacheInterface
56
    {
57 1
        return $this;
58
    }
59
}
60