CloneCommand::grouppedBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace Linode\Api\Servers\Commands;
4
5
use Linode\Api\Api\LinodeResourceCommand;
6
7
class CloneCommand extends LinodeResourceCommand
8
{
9
    public function resourcePath()
10
    {
11
        return 'clone';
12
    }
13
14
    public function at(string $region)
15
    {
16
        return $this->attachPayload('region', $region);
17
    }
18
19
    public function withType(string $type)
20
    {
21
        return $this->attachPayload('type', $type);
22
    }
23
24
    public function identifiedAs(string $label)
25
    {
26
        return $this->attachPayload('label', $label);
27
    }
28
29
    public function grouppedBy(string $group)
30
    {
31
        return $this->attachPayload('group', $group);
32
    }
33
34
    public function withBackup(bool $withBackup = true)
35
    {
36
        return $this->attachPayload('with_backup', $withBackup);
37
    }
38
39
    public function withDisks(array $disks)
40
    {
41
        return $this->attachPayload('disks', $disks);
42
    }
43
44
    public function withConfigs(array $configs)
45
    {
46
        return $this->attachPayload('configs', $configs);
47
    }
48
}
49