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::retrieve()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
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\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