representationDoesNotExist()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
ccs 0
cts 10
cp 0
rs 9.4285
cc 1
eloc 6
nc 1
nop 2
crap 2
1
<?php
2
3
namespace TonicForHealth\PagerDutyClient\RepresentProcessor\Exception;
4
5
use Exception;
6
7
/**
8
 * Class RepresentProcessorException.
9
 */
10
class RepresentProcessorException extends Exception
11
{
12
    /**
13
     * @param string $className
14
     * @param string $type
15
     *
16
     * @return self
17
     */
18
    public static function representationDoesNotExist($className, $type)
19
    {
20
        return new self(
21
            sprintf(
22
                'Representation doesn\'t exist for CLASSNAME:%s and TYPE:%s',
23
                $className,
24
                $type
25
            )
26
        );
27
    }
28
}
29