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 — 2.0 ( fb4bbc...dcdbd9 )
by Nico
29:09 queued 02:20
created

Apikey   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A Get() 0 4 1
A Create() 0 4 1
1
<?php
2
namespace Datatrics\API\Modules;
3
4
class Apikey extends Base
5
{
6
    /**
7
     * Private constructor so only the client can create this
8
     * @param string $apikey
9
     */
10
    public function __construct($apikey)
11
    {
12
        parent::__construct($apikey, "/apikey");
13
    }
14
15
    /**
16
     * Get all apikeys
17
     * @param object Containing query arguments
18
     * @return object Result of the request
19
     */
20
    public function Get($args = array("limit" => 50))
21
    {
22
        return$this->request(self::HTTP_GET, "?".http_build_query($args));
23
    }
24
25
    /**
26
     * Create a new apikey
27
     * @param object Containing all values of the apikey
28
     * @return object Result of the request
29
     */
30
    public function Create($apikey)
31
    {
32
        return $this->request(self::HTTP_POST, "", $apikey);
33
    }
34
}
35