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

FloatingIp::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace OpenStack\Networking\v2\Extensions\Layer3\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
use OpenCloud\Common\Resource\Updateable;
11
use OpenStack\Networking\v2\Extensions\Layer3\Api;
12
13
/**
14
 * @property Api $api
15
 */
16
class FloatingIp extends OperatorResource implements Listable, Creatable, Retrievable, Updateable, Deletable
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
    /** @var string */
19
    public $id;
20
21
    /** @var string */
22
    public $status;
23
24
    /** @var string */
25
    public $floatingNetworkId;
26
27
    /** @var string */
28
    public $routerId;
29
30
    /** @var string */
31
    public $fixedIpAddress;
32
33
    /** @var string */
34
    public $floatingIpAddress;
35
36
    /** @var string */
37
    public $tenantId;
38
39
    /** @var string */
40
    public $portId;
41
42
    protected $aliases = [
43
        "floating_network_id" => 'floatingNetworkId',
44
        "router_id"           => 'routerId',
45
        "fixed_ip_address"    => 'fixedIpAddress',
46
        "floating_ip_address" => 'floatingIpAddress',
47
        "tenant_id"           => 'tenantId',
48
        "port_id"             => 'portId',
49
    ];
50
51
    protected $resourceKey = 'floatingip';
52
    protected $resourcesKey = 'floatingips';
53
54
    public function create(array $userOptions): Creatable
55
    {
56
        $response = $this->execute($this->api->postFloatingIps(), $userOptions);
57
        return $this->populateFromResponse($response);
58
    }
59
60
    public function update()
61
    {
62
        $response = $this->executeWithState($this->api->putFloatingIp());
63
        $this->populateFromResponse($response);
64
    }
65
66
    public function delete()
67
    {
68
        $this->executeWithState($this->api->deleteFloatingIp());
69
    }
70
71
    public function retrieve()
72
    {
73
        $this->executeWithState($this->api->getFloatingIp());
74
    }
75
}
76