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.

VolumeType::delete()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace OpenStack\BlockStorage\v2\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\Updateable;
10
11
/**
12
 * @property \OpenStack\BlockStorage\v2\Api $api
13
 */
14
class VolumeType extends OperatorResource implements Listable, Creatable, Updateable, Deletable
15
{
16
    /** @var string */
17
    public $id;
18
19
    /** @var string */
20
    public $name;
21
22
    protected $resourceKey  = 'volume_type';
23
    protected $resourcesKey = 'volume_types';
24
25
    /**
26
     * @param array $userOptions {@see \OpenStack\BlockStorage\v2\Api::postTypes}
27
     *
28
     * @return Creatable
29
     */
30 1
    public function create(array $userOptions): Creatable
31
    {
32 1
        $response = $this->execute($this->api->postTypes(), $userOptions);
33 1
        return $this->populateFromResponse($response);
34
    }
35
36 1
    public function update()
37
    {
38 1
        $this->executeWithState($this->api->putType());
39 1
    }
40
41 1
    public function delete()
42
    {
43 1
        $this->executeWithState($this->api->deleteType());
44 1
    }
45
}
46