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

EventValidationResponseCorruptDataException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A eventApiResponseCorrupt() 0 9 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 1
            sprintf(
19 1
                'Event api returned the corrupt response data:%s',
20 1
                var_export($data, true)
21 1
            )
22 1
        );
23
    }
24
}
25