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 ( 4f3d6d...5eac22 )
by Šimon
01:56
created

Sms::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 17
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

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