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.

Credential::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
ccs 3
cts 3
cp 1
cc 1
eloc 3
nc 1
nop 1
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
use OpenStack\Common\Resource\Retrievable;
10
use OpenStack\Common\Resource\Updateable;
11
12
/**
13
 * @property \OpenStack\Identity\v3\Api $api
14
 */
15
class Credential extends OperatorResource implements Creatable, Updateable, Retrievable, Listable, 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 $aliases = [
36
        'project_id' => 'projectId',
37
        'user_id'    => 'userId',
38
    ];
39
40
    /**
41
     * {@inheritDoc}
42
     */
43 1
    public function create(array $data): Creatable
44
    {
45 1
        $response = $this->execute($this->api->postCredentials(), $data);
46 1
        return $this->populateFromResponse($response);
47
    }
48
49
    /**
50
     * {@inheritDoc}
51
     */
52 1
    public function retrieve()
53
    {
54 1
        $response = $this->executeWithState($this->api->getCredential());
55 1
        $this->populateFromResponse($response);
56
    }
57
58
    /**
59
     * {@inheritDoc}
60
     */
61 1
    public function update()
62
    {
63 1
        $response = $this->executeWithState($this->api->patchCredential());
64 1
        $this->populateFromResponse($response);
65
    }
66
67
    /**
68
     * {@inheritDoc}
69
     */
70 1
    public function delete()
71
    {
72 1
        $this->executeWithState($this->api->deleteCredential());
73 1
    }
74
}
75