Completed
Pull Request — master (#365)
by Alessandro
03:29
created

UnsupportedProxyOperationException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 12
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A cacheDoesNotImplement() 0 4 1
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\Exception;
13
14
/**
15
 * Thrown when the CacheInvalidator is asked for an operation the underlying
16
 * cache proxy does not support.
17
 */
18
class UnsupportedProxyOperationException extends \RuntimeException implements HttpCacheException
19
{
20
    /**
21
     * @param string $method Name of the HTTP method that would be required
22
     *
23
     * @return UnsupportedProxyOperationException
24
     */
25
    public static function cacheDoesNotImplement($method)
26
    {
27
        return new self(sprintf('HTTP cache does not support %s requests', $method));
28
    }
29
}
30