eventApiResponseCorrupt()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 9
ccs 4
cts 4
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 EventValidationResponseCorruptDataException.
7
 */
8
class EventValidationResponseCorruptDataException extends EventValidationResponseException
9
{
10
    /**
11
     * @param mixed $data
12
     *
13
     * @return EventValidationResponseCorruptDataException
14
     */
15 1
    public static function eventApiResponseCorrupt($data)
16
    {
17 1
        return new self(
18
            sprintf(
19 1
                'Event api returned the corrupt response data:%s',
20 1
                var_export($data, true)
21
            )
22
        );
23
    }
24
}
25