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   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 1
dl 0
loc 66
ccs 0
cts 36
cp 0
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 2
A getMessage() 0 4 1
A getType() 0 4 1
A getRecipients() 0 4 1
A getSender() 0 4 1
A getCustomId() 0 4 1
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