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.

Role   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 33
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
A delete() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace OpenStack\Identity\v3\Models;
4
5
use OpenStack\Common\Resource\OperatorResource;
6
use OpenStack\Common\Resource\Creatable;
7
use OpenStack\Common\Resource\Deletable;
8
use OpenStack\Common\Resource\Listable;
9
10
/**
11
 * @property \OpenStack\Identity\v3\Api $api
12
 */
13
class Role extends OperatorResource implements Creatable, Listable, Deletable
14
{
15
    /** @var string */
16
    public $id;
17
18
    /** @var string */
19
    public $name;
20
21
    /** @var array */
22
    public $links;
23
24
    protected $resourceKey = 'role';
25
    protected $resourcesKey = 'roles';
26
27
    /**
28
     * {@inheritDoc}
29
     *
30
     * @param array $data {@see \OpenStack\Identity\v3\Api::postRoles}
31
     */
32 1
    public function create(array $data): Creatable
33
    {
34 1
        $response = $this->execute($this->api->postRoles(), $data);
35 1
        return $this->populateFromResponse($response);
36
    }
37
38
    /**
39
     * {@inheritDoc}
40
     */
41 1
    public function delete()
42
    {
43 1
        $this->executeWithState($this->api->deleteRole());
44 1
    }
45
}
46