CouldNotSendNotification   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 13
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A serviceRespondedWithAnError() 0 10 1
1
<?php
2
3
namespace NotificationChannels\AwsPinpoint\Exceptions;
4
5
class CouldNotSendNotification extends \Exception
6
{
7
    public static function serviceRespondedWithAnError($exception)
8
    {
9
        $msg = sprintf(
10
            'AWS Pinpoint responded with an error \'%s: %s\'',
11
            $exception->getCode(),
12
            $exception->getMessage()
13
        );
14
15
        return new static($msg);
16
    }
17
}
18