Completed
Push — master ( 334344...573b25 )
by Peter
05:17
created

InvalidSetException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
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 17
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A notInstanceOf() 0 8 1
1
<?php
2
3
/**
4
 * GpsLab component.
5
 *
6
 * @author    Peter Gribanov <[email protected]>
7
 * @copyright Copyright (c) 2011, Peter Gribanov
8
 * @license   http://opensource.org/licenses/MIT
9
 */
10
11
namespace GpsLab\Component\Enum\Exception;
12
13
class InvalidSetException extends \InvalidArgumentException
14
{
15
    /**
16
     * @param string $expected
17
     * @param string $actual
18
     *
19
     * @return self
20
     */
21 7
    public static function notInstanceOf($expected, $actual)
22
    {
23 7
        return new self(sprintf(
24 7
            'Set should be an instance of "%s" of the same enum as this "%s".',
25 7
            $expected,
26
            $actual
27 7
        ));
28
    }
29
}
30