ImageApi::getList()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 2
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 ImageApi extends BaseLinodeApi
22
{
23
    /**
24
     * Deletes a gold-master image.
25
     *
26
     * @param int $ImageID [required] The ID of the gold-master image to delete
27
     *
28
     * @return array
29
     */
30 1
    public function delete($ImageID)
31
    {
32 1
        return $this->call('image.delete', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->call('imag...'ImageID' => $ImageID)) returns the type boolean which is incompatible with the documented return type array.
Loading history...
33 1
            'ImageID' => $ImageID,
34
        ]);
35
    }
36
37
    /**
38
     * Lists available gold-master images.
39
     *
40
     * @param int $ImageID [optional] Request information for a specific gold-master image
41
     * @param int $pending [optional] Show images currently being created.
42
     *
43
     * @return array
44
     */
45 1
    public function getList($ImageID = null, $pending = null)
46
    {
47 1
        return $this->call('image.list', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->call('imag...'pending' => $pending)) returns the type boolean which is incompatible with the documented return type array.
Loading history...
48 1
            'ImageID' => $ImageID,
49 1
            'pending' => $pending,
50
        ]);
51
    }
52
53
    /**
54
     * Update an Image record.
55
     *
56
     * @param int    $ImageID     [required] The ID of the Image to modify.
57
     * @param string $label       [optional] The label of the Image.
58
     * @param string $description [optional] An optional description of the Image.
59
     *
60
     * @return array
61
     */
62 1
    public function update($ImageID, $label = null, $description = null)
63
    {
64 1
        return $this->call('image.update', [
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->call('imag...tion' => $description)) returns the type boolean which is incompatible with the documented return type array.
Loading history...
65 1
            'ImageID'     => $ImageID,
66 1
            'label'       => $label,
67 1
            'description' => $description,
68
        ]);
69
    }
70
}
71