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.

Billing   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A billing() 0 4 1
A history() 0 13 1
1
<?php
2
3
namespace Cloudflare\User;
4
5
use Cloudflare\Api;
6
7
/**
8
 * CloudFlare API wrapper
9
 *
10
 * Billing
11
 *
12
 * @author James Bell <[email protected]>
13
 *
14
 * @version 1
15
 */
16
class Billing extends Api
17
{
18
    /**
19
     * Billing Profile (permission needed: #billing:read)
20
     * Access your billing profile object
21
     */
22
    public function billing()
0 ignored issues
show
Coding Style Best Practice introduced by
Please use __construct() instead of a PHP4-style constructor that is named after the class.
Loading history...
23
    {
24
        return $this->get('/user/billing/profile');
25
    }
26
27
    /**
28
     * Billing History (permission needed: #billing:read)
29
     * Access your billing profile object
30
     *
31
     * @param int|null    $page       Page number of paginated results
32
     * @param int|null    $per_page   Number of items per page
33
     * @param string|null $order      Field to order billing history by
34
     * @param string|null $type       The billing item type
35
     * @param string|null $occured_at When the billing item was created
36
     * @param string|null $action     The billing item action
37
     */
38
    public function history($page = null, $per_page = null, $order = null, $type = null, $occured_at = null, $action = null)
39
    {
40
        $data = [
41
            'page'       => $page,
42
            'per_page'   => $per_page,
43
            'order'      => $order,
44
            'type'       => $type,
45
            'occured_at' => $occured_at,
46
            'action'     => $action,
47
        ];
48
49
        return $this->get('/user/billing/history', $data);
50
    }
51
}
52