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 (#136)
by Frank
02:41 queued 44s
created

LoadBalancerMember::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace OpenStack\Networking\v2\Models;
4
5
use OpenStack\Common\Resource\Creatable;
6
use OpenStack\Common\Resource\Deletable;
7
use OpenStack\Common\Resource\OperatorResource;
8
use OpenStack\Common\Resource\Retrievable;
9
use OpenStack\Common\Resource\Updateable;
10
use OpenStack\Networking\v2\Api;
11
12
/**
13
 * Represents a Neutron v2 LoadBalancer member
14
 *
15
 * @property Api $api
16
 */
17
class LoadBalancerMember extends OperatorResource implements Creatable, Retrievable, Updateable, Deletable
18
{
19
    /**
20
     * @var string
21
     */
22
    public $id;
23
24
    /**
25
     * @var string
26
     */
27
    public $tenantId;
28
29
    /**
30
     * @var string
31
     */
32
    public $address;
33
34
    /**
35
     * @var integer
36
     */
37
    public $protocolPort;
38
39
    /**
40
     * @var integer
41
     */
42
    public $weight;
43
44
    /**
45
     * @var string
46
     */
47
    public $subnetId;
48
49
    /**
50
     * @var string
51
     */
52
    public $poolId;
53
54
    /**
55
     * @var boolean
56
     */
57
    public $adminStateUp;
58
59
    /**
60
     * @var string
61
     */
62
    public $operatingStatus;
63
64
    /**
65
     * @var string
66
     */
67
    public $provisioningStatus;
68
69
    protected $resourcesKey = 'members';
70
    protected $resourceKey = 'member';
71
72
    protected $aliases = [
73
        'tenant_id'           => 'tenantId',
74
        'admin_state_up'      => 'adminStateUp',
75
        'protocol_port'       => 'protocolPort',
76
        'subnet_id'           => 'subnetId',
77
        'pool_id'             => 'poolId',
78
        'operating_status'    => 'operatingStatus',
79
        'provisioning_status' => 'provisioningStatus'
80
    ];
81
82
    /**
83
     * {@inheritDoc}
84
     */
85
    public function create(array $userOptions): Creatable
86
    {
87
        $userOptions = array_merge(['poolId' => $this->poolId], $userOptions);
88
        $response = $this->execute($this->api->postLoadBalancerMember(), $userOptions);
89
        return $this->populateFromResponse($response);
90
    }
91
92
    /**
93
     * {@inheritDoc}
94
     */
95
    public function retrieve()
96
    {
97
        $response = $this->execute($this->api->getLoadBalancerMember(), ['poolId' => (string)$this->poolId, 'id' => (string)$this->id]);
98
        $this->populateFromResponse($response);
99
    }
100
101
    /**
102
     * {@inheritDoc}
103
     */
104
    public function update()
105
    {
106
        $response = $this->executeWithState($this->api->putLoadBalancerMember(), ['poolId' => (string)$this->poolId, 'id' => (string)$this->id]);
0 ignored issues
show
Unused Code introduced by
The call to LoadBalancerMember::executeWithState() has too many arguments starting with array('poolId' => (strin... => (string) $this->id).

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
107
        $this->populateFromResponse($response);
108
    }
109
110
    /**
111
     * {@inheritDoc}
112
     */
113
    public function delete()
114
    {
115
        $this->executeWithState($this->api->deleteLoadBalancerMember(), ['poolId' => (string)$this->poolId, 'id' => (string)$this->id]);
0 ignored issues
show
Unused Code introduced by
The call to LoadBalancerMember::executeWithState() has too many arguments starting with array('poolId' => (strin... => (string) $this->id).

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
116
    }
117
}
118