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.

Organizations   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A update() 0 8 1
A organization() 0 4 1
1
<?php
2
3
namespace Cloudflare;
4
5
/**
6
 * CloudFlare API wrapper
7
 *
8
 * Organizations
9
 *
10
 * @author James Bell <[email protected]>
11
 *
12
 * @version 1
13
 */
14
class Organizations extends Api
15
{
16
    /**
17
     * Organization details (permission needed: #organization:read)
18
     * Get information about a specific organization that you are a member of
19
     *
20
     * @param string $identifier
21
     */
22
    public function organization($identifier)
23
    {
24
        return $this->get('/organizations/'.$identifier);
25
    }
26
27
    /**
28
     * Update organization (permission needed: #organization:edit)
29
     * Update an existing Organization
30
     *
31
     * @param string|null $identifier
32
     * @param string|null $name       Organization Name
33
     */
34
    public function update($identifier = null, $name = null)
35
    {
36
        $data = [
37
            'name' => $name,
38
        ];
39
40
        return $this->get('/organizations/'.$identifier, $data);
41
    }
42
}
43