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::delete()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
ccs 3
cts 3
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 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