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 ( 8fccc5...dea5ad )
by Jamie
8s
created

SecurityGroup   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 61
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
A delete() 0 4 1
A retrieve() 0 5 1
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