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

Service::getSecurityGroupRule()   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 1
1
<?php
2
3
namespace OpenStack\Networking\v2\Extensions\SecurityGroups;
4
5
use OpenCloud\Common\Service\AbstractService;
6
use OpenStack\Networking\v2\Extensions\SecurityGroups\Models\SecurityGroup;
7
use OpenStack\Networking\v2\Extensions\SecurityGroups\Models\SecurityGroupRule;
8
9
/**
10
 * @property Api $api
11
 */
12
class Service extends AbstractService
13
{
14
    private function securityGroup(array $info = []): SecurityGroup
15
    {
16
        return $this->model(SecurityGroup::class, $info);
17
    }
18
19
    private function securityGroupRule(array $info = []): SecurityGroupRule
20
    {
21
        return $this->model(SecurityGroupRule::class, $info);
22
    }
23
24
    /**
25
     * @return \Generator
26
     */
27
    public function listSecurityGroups(): \Generator
28
    {
29
        return $this->securityGroup()->enumerate($this->api->getSecurityGroups());
30
    }
31
32
    /**
33
     * @param array $options
34
     *
35
     * @return SecurityGroup
36
     */
37
    public function createSecurityGroup(array $options): SecurityGroup
38
    {
39
        return $this->securityGroup()->create($options);
40
    }
41
42
    /**
43
     * @param string $id
44
     *
45
     * @return SecurityGroup
46
     */
47
    public function getSecurityGroup(string $id): SecurityGroup
48
    {
49
        return $this->securityGroup(['id' => $id]);
50
    }
51
52
    /**
53
     * @return \Generator
54
     */
55
    public function listSecurityGroupRules(): \Generator
56
    {
57
        return $this->securityGroupRule()->enumerate($this->api->getSecurityRules());
58
    }
59
60
    /**
61
     * @param array $options
62
     *
63
     * @return SecurityGroupRule
64
     */
65
    public function createSecurityGroupRule(array $options): SecurityGroupRule
66
    {
67
        return $this->securityGroupRule()->create($options);
68
    }
69
70
    /**
71
     * @param string $id
72
     *
73
     * @return SecurityGroupRule
74
     */
75
    public function getSecurityGroupRule(string $id): SecurityGroupRule
76
    {
77
        return $this->securityGroupRule(['id' => $id]);
78
    }
79
}
80