CompressionLevelException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A invalid() 0 9 1
1
<?php
2
/**
3
 * GpsLab component.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/MIT
8
 */
9
10
namespace GpsLab\Component\Sitemap\Stream\Exception;
11
12
class CompressionLevelException extends \InvalidArgumentException
13
{
14
    /**
15
     * @param int $current_level
16
     * @param int $min_level
17
     * @param int $max_level
18
     *
19
     * @return static
20
     */
21 5
    final public static function invalid($current_level, $min_level, $max_level)
22
    {
23 5
        return new static(sprintf(
24 5
            'Compression level "%s" must be in interval [%d, %d].',
25 5
            $current_level,
26 5
            $min_level,
27 5
            $max_level
28
        ));
29
    }
30
}
31