Completed
Pull Request — master (#289)
by Gavin
14:31 queued 11:29
created

Noop::banPath()   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 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 3
crap 2
1
<?php
2
3
/*
4
 * This file is part of the FOSHttpCache package.
5
 *
6
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace FOS\HttpCache\ProxyClient;
13
14
use FOS\HttpCache\ProxyClient\Invalidation\BanInterface;
15
use FOS\HttpCache\ProxyClient\Invalidation\PurgeInterface;
16
use FOS\HttpCache\ProxyClient\Invalidation\RefreshInterface;
17
use FOS\HttpCache\ProxyClient\Invalidation\TagsInterface;
18
use Http\Message\MessageFactory;
19
20
/**
21
 * Class Noop
22
 *
23
 * @author Gavin Staniforth <[email protected]>
24
 */
25
class Noop implements ProxyClientInterface, BanInterface, PurgeInterface, RefreshInterface, TagsInterface
26
{
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function ban(array $headers)
31
    {
32
        return $this;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function banPath($path, $contentType = null, $hosts = null)
39
    {
40
        return $this;
41
    }
42
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function invalidateTags(array $tags)
48
    {
49
        return $this;
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55
    public function getTagsHeaderValue(array $tags)
56
    {
57
        return [];
58
    }
59
60
    /**
61
     * {@inheritdoc}
62
     */
63
    public function getTagsHeaderName()
64
    {
65
        return 'X-Noop-Cache-Tags';
66
    }
67
68
    /**
69
     * {@inheritdoc}
70
     */
71
    public function purge($url, array $headers = [])
72
    {
73
        return $this;
74
    }
75
76
    /**
77
     * {@inheritdoc}
78
     */
79
    public function refresh($url, array $headers = [])
80
    {
81
        return $this;
82
    }
83
84
    /**
85
     * {@inheritdoc}
86
     */
87
    public function flush()
88
    {
89
        return 0;
90
    }
91
}
92