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.

Plan   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 36
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A available() 0 4 1
A details() 0 4 1
A change() 0 4 1
1
<?php
2
3
namespace Cloudflare\Zone;
4
5
use Cloudflare\Api;
6
7
/**
8
 * CloudFlare API wrapper
9
 *
10
 * Zone Plan
11
 *
12
 * @author James Bell <[email protected]>
13
 *
14
 * @version 1
15
 */
16
class Plan extends Api
17
{
18
    /**
19
     * Available plans (permission needed: #billing:read)
20
     * List all plans the zone can subscribe to.
21
     *
22
     * @param string $zone_identifier
23
     */
24
    public function available($zone_identifier)
25
    {
26
        return $this->get('zones/'.$zone_identifier.'/available_rate_plans');
27
    }
28
29
    /**
30
     * Available plans (permission needed: #billing:read)
31
     *
32
     * @param string $zone_identifier
33
     * @param string $identifier      API item identifier tag
34
     */
35
    public function details($zone_identifier, $identifier)
36
    {
37
        return $this->get('zones/'.$zone_identifier.'/plans/'.$identifier);
38
    }
39
40
    /**
41
     * Change plan (permission needed: #billing:edit)
42
     * Change the plan level for the zone. This will cancel any previous subscriptions and subscribe the zone to the new plan.
43
     *
44
     * @param string $zone_identifier
45
     * @param string $identifier      API item identifier tag
46
     */
47
    public function change($zone_identifier, $identifier)
48
    {
49
        return $this->put('zones/'.$zone_identifier.'/plans/'.$identifier.'/subscribe');
50
    }
51
}
52