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.

Invites   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 2 Features 0
Metric Value
wmc 3
c 2
b 2
f 0
lcom 0
cbo 1
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A invites() 0 4 1
A details() 0 4 1
A respond() 0 8 1
1
<?php
2
3
namespace Cloudflare\User;
4
5
use Cloudflare\Api;
6
7
/**
8
 * CloudFlare API wrapper
9
 *
10
 * Invites
11
 *
12
 * @author James Bell <[email protected]>
13
 *
14
 * @version 1
15
 */
16
class Invites extends Api
17
{
18
    /**
19
     * List invitations (permission needed: #invites:read)
20
     * List all invitations associated with my user
21
     */
22
    public function invites()
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/invites');
25
    }
26
27
    /**
28
     * Invitation details (permission needed: #invites:read)
29
     * Get the details of an invitation
30
     *
31
     * @param string $identifier
32
     */
33
    public function details($identifier)
34
    {
35
        return $this->get('/user/invites/'.$identifier);
36
    }
37
38
    /**
39
     * Respond to Invitation (permission needed: #invites:edit)
40
     * Respond to an invitation
41
     *
42
     * @param string $identifier
43
     * @param string $status     Status of your response to the invitation (rejected or accepted)
44
     */
45
    public function respond($identifier, $status)
46
    {
47
        $data = [
48
            'status' => $status,
49
        ];
50
51
        return $this->patch('/user/invites/'.$identifier, $data);
52
    }
53
}
54