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 (#39)
by Rubens
12:33
created

Subscription   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 49
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A endpoint() 0 4 1
A periods() 0 4 1
A renew() 0 4 1
A reactivate() 0 4 1
1
<?php
2
3
namespace Vindi;
4
5
class Subscription extends Resource
6
{
7
    /**
8
     * The endpoint that will hit the API.
9
     *
10
     * @return string
11
     */
12 20
    public function endpoint()
13
    {
14 20
        return 'subscriptions';
15
    }
16
17
    /**
18
     * Make a GET request to subscriptions/{id}/periods.
19
     *
20
     * @param int $id The resource's id.
21
     *
22
     * @return mixed
23
     */
24 2
    public function periods($id)
25
    {
26 2
        return $this->get($id, 'periods');
27
    }
28
29
    /**
30
     * Make a POST request to subscriptions/{id}/renew.
31
     *
32
     * @param int $id The resource's id.
33
     *
34
     * @return mixed
35
     */
36 2
    public function renew($id)
37
    {
38 2
        return $this->post($id, 'renew');
39
    }
40
41
    /**
42
     * Make a POST request to subscriptions/{id}/reactivate.
43
     *
44
     * @param int $id The resource's id.
45
     *
46
     * @return mixed
47
     */
48
    public function reactivate($id)
49
    {
50
        return $this->post($id, 'reactivate');
51
    }
52
53
}
54