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
Push — master ( c02a04...4072ed )
by James
03:03
created

Organizations::organization()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Cloudflare;
4
5
use Cloudflare\Api;
6
7
/**
8
 * CloudFlare API wrapper
9
 *
10
 * Organizations
11
 *
12
 * @author James Bell <[email protected]>
13
 *
14
 * @version 1
15
 */
16
class Organizations extends Api
17
{
18
    /**
19
     * Default permissions level
20
     *
21
     * @var array
22
     */
23
    protected $permission_level = ['read' => '#organization:read', 'edit' => '#organization:edit'];
24
25
    /**
26
     * Organization details (permission needed: #organization:read)
27
     * Get information about a specific organization that you are a member of
28
     *
29
     * @param string $identifier
30
     */
31
    public function organization($identifier)
32
    {
33
        return $this->get('/organizations/'.$identifier);
34
    }
35
36
    /**
37
     * Update organization (permission needed: #organization:edit)
38
     * Update an existing Organization
39
     *
40
     * @param string|null $identifier
41
     * @param string|null $name       Organization Name
42
     */
43
    public function update($identifier = null, $name = null)
44
    {
45
        $data = [
46
            'name' => $name,
47
        ];
48
49
        return $this->get('/organizations/'.$identifier, $data);
50
    }
51
}
52