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

cacheDoesNotImplement()   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
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
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\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