Test Failed
Pull Request — master (#1)
by
unknown
04:50 queued 48s
created

CouldNotSendNotification   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 3
Bugs 2 Features 0
Metric Value
eloc 2
c 3
b 2
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A serviceRespondedWithAnError() 0 3 1
1
<?php
2
3
namespace NotificationChannels\AfricasTalking\Exceptions;
4
5
use Exception;
6
7
class CouldNotSendNotification extends Exception
8
{
9
    /**
10
     * @param string $error
11
     * @return CouldNotSendNotification
12
     */
13
    public static function serviceRespondedWithAnError(string $error): self
14
    {
15
        return new static("AfricasTalking service responded with an error: {$error}");
16
    }
17
}
18