GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

SendingFailed::forRecipients()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
ccs 0
cts 6
cp 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimPod\SmsManager\Exception;
6
7
use Exception;
8
use SimpleXMLElement;
9
use function implode;
10
use function sprintf;
11
12
final class SendingFailed extends Exception
13
{
14
    /**
15
     * @param string[] $recipients
16
     */
17
    public static function forRecipients(array $recipients, SimpleXMLElement $response) : self
18
    {
19
        return new self(
20
            sprintf(
21
                'Sending failed for "%s" because "%s"',
22
                implode(', ', $recipients),
23
                (string) $response->Response[0]
24
            )
25
        );
26
    }
27
}
28