Passed
Pull Request — master (#85)
by BENOIT
03:47
created

NullCacheStrategy::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 2
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