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 — master ( 30eaeb...835a4f )
by Ha
01:52
created

Endpoint   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 7
lcom 3
cbo 1
dl 0
loc 65
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
A delete() 0 4 1
A update() 0 5 1
A regionMatches() 0 4 2
A interfaceMatches() 0 4 2
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\Updateable;
9
10
/**
11
 * @property \OpenStack\Identity\v3\Api $api
12
 */
13
class Endpoint extends OperatorResource implements Creatable, Updateable, Deletable
14
{
15
    /** @var string */
16
    public $id;
17
18
    /** @var string */
19
    public $interface;
20
21
    /** @var string */
22
    public $name;
23
24
    /** @var string */
25
    public $serviceId;
26
27
    /** @var string */
28
    public $region;
29
30
    /** @var array */
31
    public $links;
32
33
    /** @var string */
34
    public $url;
35
36
    protected $resourceKey = 'endpoint';
37
    protected $resourcesKey = 'endpoints';
38
    protected $aliases = ['service_id' => 'serviceId'];
39
40
    /**
41
     * {@inheritDoc}
42
     *
43
     * @param array $data {@see \OpenStack\Identity\v3\Api::postEndpoints}
44
     */
45 2
    public function create(array $data): Creatable
46
    {
47 2
        $response = $this->execute($this->api->postEndpoints(), $data);
48 2
        return $this->populateFromResponse($response);
49
    }
50
51
    /**
52
     * {@inheritDoc}
53
     */
54 1
    public function update()
55
    {
56 1
        $response = $this->executeWithState($this->api->patchEndpoint());
57 1
        $this->populateFromResponse($response);
58
    }
59
60
    /**
61
     * {@inheritDoc}
62
     */
63 1
    public function delete()
64
    {
65 1
        $this->execute($this->api->deleteEndpoint(), $this->getAttrs(['id']));
66 1
    }
67
68 2
    public function regionMatches(string $value): bool
69
    {
70 2
        return $this->region && $this->region == $value;
71
    }
72
73 2
    public function interfaceMatches(string $value): bool
74
    {
75 2
        return $this->interface && $this->interface == $value;
76
    }
77
}
78