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 (#48)
by Jamie
02:30
created

SecurityGroup::delete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php declare (strict_types=1);
2
3
namespace OpenStack\Networking\v2\Extensions\SecurityGroups\Models;
4
5
use OpenCloud\Common\Resource\OperatorResource;
6
use OpenCloud\Common\Resource\Creatable;
7
use OpenCloud\Common\Resource\Deletable;
8
use OpenCloud\Common\Resource\Listable;
9
use OpenCloud\Common\Resource\Retrievable;
10
11
/**
12
 * Represents a SecurityGroup resource in the Network v2 service
13
 *
14
 * @property \OpenStack\Networking\v2\Extensions\SecurityGroups\Api $api
15
 */
16
class SecurityGroup extends OperatorResource implements Creatable, Listable, Deletable, Retrievable
0 ignored issues
show
Bug introduced by
There is one abstract method enumerate in this class; you could implement it, or declare this class as abstract.
Loading history...
17
{
18
    /**
19
     * @var string
20
     */
21
    public $description;
22
23
    /**
24
     * @var string
25
     */
26
    public $id;
27
28
    /**
29
     * @var string
30
     */
31
    public $name;
32
33
    /**
34
     * @var []SecurityGroupRule
35
     */
36
    public $securityGroupRules;
37
38
    /**
39
     * @var string
40
     */
41
    public $tenantId;
42
43
    protected $aliases = [
44
        'security_group_rules' => 'securityGroupRules',
45
        'tenant_id'            => 'tenantId',
46
    ];
47
48
    protected $resourceKey  = 'security_group';
49
    protected $resourcesKey = 'security_groups';
50
51
    /**
52
     * {@inheritDoc}
53
     */
54
    public function create(array $userOptions): Creatable
55
    {
56
        $response = $this->execute($this->api->postSecurityGroups(), $userOptions);
57
        return $this->populateFromResponse($response);
58
    }
59
60
    /**
61
     * {@inheritDoc}
62
     */
63
    public function delete()
64
    {
65
        $this->executeWithState($this->api->deleteSecurityGroup());
66
    }
67
68
    /**
69
     * {@inheritDoc}
70
     */
71
    public function retrieve()
72
    {
73
        $response = $this->executeWithState($this->api->getSecurityGroup());
74
        $this->populateFromResponse($response);
75
    }
76
}
77