Passed
Push — master ( d8c2a1...59198c )
by Kevin
07:55
created

NullCacheStrategy   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
dl 0
loc 35
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0
ccs 4
cts 8
cp 0.5
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A fetch() 0 4 1
A cache() 0 4 1
A update() 0 4 1
A delete() 0 4 1
1
<?php
2
3
namespace Kevinrob\GuzzleCache\Strategy;
4
5
use Kevinrob\GuzzleCache\CacheEntry;
6
use Psr\Http\Message\RequestInterface;
7
use Psr\Http\Message\ResponseInterface;
8
9
class NullCacheStrategy implements CacheStrategyInterface
10
{
11
12
    /**
13
     * @inheritDoc
14
     */
15 2
    public function fetch(RequestInterface $request)
16
    {
17 2
        return null;
18
    }
19
20
    /**
21
     * @inheritDoc
22
     */
23 2
    public function cache(RequestInterface $request, ResponseInterface $response)
24
    {
25 2
        return true;
26
    }
27
28
    /**
29
     * @inheritDoc
30
     */
31
    public function update(RequestInterface $request, ResponseInterface $response)
32
    {
33
        return true;
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function delete(RequestInterface $request)
40
    {
41
        return true;
42
    }
43
}
44