NodeBalancerApi::delete()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
//----------------------------------------------------------------------
4
//
5
//  Copyright (C) 2015-2017 Artem Rodygin
6
//
7
//  This file is part of Linode API Client Library for PHP.
8
//
9
//  You should have received a copy of the MIT License along with
10
//  the library. If not, see <http://opensource.org/licenses/MIT>.
11
//
12
//----------------------------------------------------------------------
13
14
namespace Linode;
15
16
/**
17
 * This class is autogenerated.
18
 *
19
 * @version Linode API v3.3
20
 */
21
class NodeBalancerApi extends BaseLinodeApi
22
{
23
    /**
24
     * @param int    $DatacenterID       [required] The DatacenterID from avail.datacenters() where you wish to place this new NodeBalancer
25
     * @param string $Label              [optional] This NodeBalancer's label
26
     * @param int    $ClientConnThrottle [optional] To help mitigate abuse, throttle connections per second, per client IP. 0 to disable. Max of 20.
27
     *
28
     * @return array
29
     */
30 1
    public function create($DatacenterID, $Label = null, $ClientConnThrottle = null)
31
    {
32 1
        return $this->call('nodebalancer.create', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->call('node...> $ClientConnThrottle)) returns the type boolean which is incompatible with the documented return type array.
Loading history...
33 1
            'DatacenterID'       => $DatacenterID,
34 1
            'Label'              => $Label,
35 1
            'ClientConnThrottle' => $ClientConnThrottle,
36
        ]);
37
    }
38
39
    /**
40
     * Immediately removes a NodeBalancer from your account and issues a pro-rated credit back to your
41
     * account, if applicable.
42
     *
43
     * @param int $NodeBalancerID [required] The NodeBalancerID to delete
44
     *
45
     * @return array
46
     */
47 1
    public function delete($NodeBalancerID)
48
    {
49 1
        return $this->call('nodebalancer.delete', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->call('node...D' => $NodeBalancerID)) returns the type boolean which is incompatible with the documented return type array.
Loading history...
50 1
            'NodeBalancerID' => $NodeBalancerID,
51
        ]);
52
    }
53
54
    /**
55
     * Returns a list of NodeBalancers this user has access or delete to, including their properties.
56
     *
57
     * @param int $NodeBalancerID [optional] Limits the list to the specified NodeBalancerID
58
     *
59
     * @return array
60
     */
61 1
    public function getList($NodeBalancerID = null)
62
    {
63 1
        return $this->call('nodebalancer.list', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->call('node...D' => $NodeBalancerID)) returns the type boolean which is incompatible with the documented return type array.
Loading history...
64 1
            'NodeBalancerID' => $NodeBalancerID,
65
        ]);
66
    }
67
68
    /**
69
     * Updates a NodeBalancer's properties.
70
     *
71
     * @param int    $NodeBalancerID     [required]
72
     * @param string $Label              [optional] This NodeBalancer's label
73
     * @param int    $ClientConnThrottle [optional] To help mitigate abuse, throttle connections per second, per client IP. 0 to disable. Max of 20.
74
     *
75
     * @return array
76
     */
77 1
    public function update($NodeBalancerID, $Label = null, $ClientConnThrottle = null)
78
    {
79 1
        return $this->call('nodebalancer.update', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->call('node...> $ClientConnThrottle)) returns the type boolean which is incompatible with the documented return type array.
Loading history...
80 1
            'NodeBalancerID'     => $NodeBalancerID,
81 1
            'Label'              => $Label,
82 1
            'ClientConnThrottle' => $ClientConnThrottle,
83
        ]);
84
    }
85
}
86