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
Pull Request — master (#159)
by Roman
01:51
created

Metric::retrieve()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace OpenStack\Metric\v1\Gnocchi\Models;
4
5
use OpenStack\Common\Resource\Alias;
6
use OpenStack\Common\Resource\OperatorResource;
7
use OpenStack\Common\Resource\Retrievable;
8
use OpenStack\Metric\v1\Gnocchi\Api;
9
10
/**
11
 * @property Api $api
12
 */
13
class Metric extends OperatorResource implements Retrievable
14
{
15
    /** @var string */
16
    public $createdByUserId;
17
18
    /** @var \OpenStack\Metric\v1\Gnocchi\Models\Resource */
19
    public $resource;
20
21
    /** @var string */
22
    public $name;
23
24
    /** @var string */
25
    public $createdByProjectId;
26
27
    /** @var array */
28
    public $archivePolicy;
29
30
    /** @var string */
31
    public $id;
32
33
    /** @var string */
34
    public $unit;
35
36
    protected $aliases = [
37
        'created_by_user_id'    => 'createdByUserId',
38
        'created_by_project_id' => 'createdByProjectId',
39
        'archive_policy'        => 'archivePolicy',
40
    ];
41
42
    /**
43
     * @inheritdoc
44
     */
45
    protected function getAliases(): array
46
    {
47
        $aliases = parent::getAliases();
48
        $aliases['resource'] = new Alias('resource', \OpenStack\Metric\v1\Gnocchi\Models\Resource::class);
49
        return $aliases;
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55
    public function retrieve()
56
    {
57
        $response = $this->executeWithState($this->api->getMetric());
58
        $this->populateFromResponse($response);
59
    }
60
}
61