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.
Completed
Pull Request — master (#15)
by
unknown
04:36
created

TwilioConfig::getAlphanumericSender()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
namespace NotificationChannels\Twilio;
3
4
class TwilioConfig
5
{
6
    /**
7
     * @var array
8
     */
9
    private $config;
10
11
    /**
12
     * TwilioConfig constructor.
13
     *
14
     * @param array $config
15
     */
16
    public function __construct(array $config)
17
    {
18
        $this->config = $config;
19
    }
20
21
    public function getAccountSid()
22
    {
23
        return $this->config['account_sid'];
24
    }
25
26
    public function getAuthToken()
27
    {
28
        return $this->config['auth_token'];
29
    }
30
31
    /**
32
     * Get the from entity from config
33
     */
34
    public function getFrom()
35
    {
36
        return $this->config['from'];
37
    }
38
39
    public function getAlphanumericSender()
40
    {
41
        if (isset($this->config['alphanumeric_sender'])) {
42
            return $this->config['alphanumeric_sender'];
43
        }
44
45
        return null;
46
    }
47
48
    public function getSmsParams()
49
    {
50
        $params = [];
51
52
        if (isset($this->config['sms_service_sid'])) {
53
            $params['MessagingServiceSid'] = $this->config['sms_service_sid'];
54
        }
55
56
        return $params;
57
    }
58
}