Test Failed
Pull Request — master (#1)
by
unknown
05:13
created

serviceRespondedWithAnError()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
c 2
b 1
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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