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.
Passed
Push — master ( fbbdbd...789991 )
by Šimon
02:05
created

SmsMessage::getSender()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimPod\SmsManager;
6
7
use SimPod\SmsManager\Exception\NoRecipientsProvided;
8
use function count;
9
10
class SmsMessage
11
{
12
    /** @var string */
13
    protected $message;
14
15
    /** @var RequestType */
16
    protected $requestType;
17
18
    /** @var string[] */
19
    protected $recipients = [];
20
21
    /** @var string|null */
22
    protected $sender;
23
24
    /** @var int|null */
25
    protected $customId;
26
27
    /**
28
     * @param string[] $recipients
29
     */
30 3
    public function __construct(
31
        string $message,
32
        array $recipients,
33
        ?RequestType $requestTypeHigh = null,
34
        ?string $sender = null,
35
        ?int $customId = null
36
    ) {
37 3
        if (count($recipients) === 0) {
38 1
            throw new NoRecipientsProvided();
39
        }
40
41 2
        $this->message = $message;
42
43 2
        if ($requestTypeHigh === null) {
44 1
            $requestTypeHigh = RequestType::getRequestTypeHigh();
45
        }
46 2
        $this->requestType = $requestTypeHigh;
47 2
        $this->sender      = $sender;
48 2
        $this->customId    = $customId;
49 2
        $this->recipients  = $recipients;
50 2
    }
51
52 2
    public function getMessage() : string
53
    {
54 2
        return $this->message;
55
    }
56
57 2
    public function getRequestType() : RequestType
58
    {
59 2
        return $this->requestType;
60
    }
61
62
    /**
63
     * @return string[]
64
     */
65 2
    public function getRecipients() : array
66
    {
67 2
        return $this->recipients;
68
    }
69
70 2
    public function getSender() : ?string
71
    {
72 2
        return $this->sender;
73
    }
74
75 2
    public function getCustomId() : ?int
76
    {
77 2
        return $this->customId;
78
    }
79
}
80