Completed
Push — master ( f1a8d5...1a6045 )
by Dmitry
03:22
created

eventApiResponseError()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
namespace TonicForHealth\PagerDutyClient\Validation\Event\Exception;
4
5
/**
6
 * Class EventValidationResponseErrorException.
7
 */
8
class EventValidationResponseErrorException extends EventValidationResponseException
9
{
10
    /**
11
     * @param string $error
12
     *
13
     * @return EventValidationResponseErrorException
14
     */
15 1
    public static function eventApiResponseError($error)
16
    {
17 1
        return new self(
18 1
            sprintf(
19 1
                'Event api returned the error:%s',
20
                $error
21 1
            )
22 1
        );
23
    }
24
}
25