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::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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