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.

Policy   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 65
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
A retrieve() 0 5 1
A update() 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
use OpenStack\Common\Resource\Retrievable;
10
use OpenStack\Common\Resource\Updateable;
11
12
/**
13
 * @property \OpenStack\Identity\v3\Api $api
14
 */
15
class Policy extends OperatorResource implements Creatable, Listable, Retrievable, Updateable, Deletable
16
{
17
    /** @var string */
18
    public $blob;
19
20
    /** @var string */
21
    public $id;
22
23
    /** @var array */
24
    public $links;
25
26
    /** @var string */
27
    public $projectId;
28
29
    /** @var string */
30
    public $type;
31
32
    /** @var string */
33
    public $userId;
34
35
    protected $resourceKey = 'policy';
36
    protected $resourcesKey = 'policies';
37
    
38
    protected $aliases = [
39
        'project_id' => 'projectId',
40
        'user_id'    => 'userId'
41
    ];
42
43
    /**
44
     * {@inheritDoc}
45 2
     *
46
     * @param array $data {@see \OpenStack\Identity\v3\Api::postPolicies}
47 2
     */
48 2
    public function create(array $data): Creatable
49
    {
50
        $response = $this->execute($this->api->postPolicies(), $data);
51
        return $this->populateFromResponse($response);
52
    }
53
54 1
    /**
55
     * {@inheritDoc}
56 1
     */
57 1
    public function retrieve()
58
    {
59
        $response = $this->execute($this->api->getPolicy(), ['id' => $this->id]);
60
        $this->populateFromResponse($response);
61
    }
62
63 1
    /**
64
     * {@inheritDoc}
65 1
     */
66 1
    public function update()
67
    {
68
        $response = $this->executeWithState($this->api->patchPolicy());
69
        $this->populateFromResponse($response);
70
    }
71
72 1
    /**
73
     * {@inheritDoc}
74 1
     */
75 1
    public function delete()
76
    {
77
        $this->execute($this->api->deletePolicy(), ['id' => $this->id]);
78
    }
79
}
80