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.

Plivo   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A from() 0 4 1
1
<?php
2
3
namespace NotificationChannels\Plivo;
4
5
use Plivo\RestAPI as PlivoRestApi;
6
7
class Plivo extends PlivoRestApi
8
{
9
    /** @var string */
10
    protected $auth_id;
11
12
    /** @var string */
13
    protected $authToken;
14
15
    /** @var string */
16
    protected $from;
17
18
    /**
19
     * Create a new Plivo RestAPI instance.
20
     *
21
     * @param array $config
22
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
23
     */
24
    public function __construct(array $config)
25
    {
26
        $this->auth_id = $config['auth_id'];
27
        $this->authToken = $config['auth_token'];
28
        $this->from = $config['from_number'];
29
30
        parent::__construct($this->auth_id, $this->authToken);
31
    }
32
33
    /**
34
     * Number SMS is being sent from.
35
     *
36
     * @return string
37
     */
38
    public function from()
39
    {
40
        return $this->from;
41
    }
42
}
43