Passed
Pull Request — master (#517)
by David
03:50 queued 02:19
created

Noop::clear()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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\BanCapable;
15
use FOS\HttpCache\ProxyClient\Invalidation\ClearCapable;
16
use FOS\HttpCache\ProxyClient\Invalidation\PurgeCapable;
17
use FOS\HttpCache\ProxyClient\Invalidation\RefreshCapable;
18
use FOS\HttpCache\ProxyClient\Invalidation\TagCapable;
19
20
/**
21
 * This is a no operation client, its only purpose is to provide an
22
 * implementation for use in an environments that have no proxy to use.
23
 *
24
 * @author Gavin Staniforth <[email protected]>
25
 */
26
class Noop implements ProxyClient, BanCapable, PurgeCapable, RefreshCapable, TagCapable, ClearCapable
27
{
28
    /**
29
     * {@inheritdoc}
30
     */
31 1
    public function ban(array $headers)
32
    {
33 1
        return $this;
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39 1
    public function banPath($path, $contentType = null, $hosts = null)
40
    {
41 1
        return $this;
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47 1
    public function invalidateTags(array $tags)
48
    {
49 1
        return $this;
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55 1
    public function purge($url, array $headers = [])
56
    {
57 1
        return $this;
58
    }
59
60
    /**
61
     * {@inheritdoc}
62
     */
63 1
    public function refresh($url, array $headers = [])
64
    {
65 1
        return $this;
66
    }
67
68
    /**
69
     * {@inheritdoc}
70
     */
71 1
    public function flush()
72
    {
73 1
        return 0;
74
    }
75
76
    /**
77
     * {@inheritdoc}
78
     */
79
    public function clear()
80
    {
81
        return $this;
82
    }
83
}
84