Total Complexity | 6 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class BackupsManager |
||
11 | { |
||
12 | /** |
||
13 | * @return ListBackupsCommand |
||
14 | */ |
||
15 | public function list() |
||
16 | { |
||
17 | return new ListBackupsCommand(); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * @param int $targetServerId = null |
||
22 | * |
||
23 | * @return RestoreBackupCommand |
||
24 | */ |
||
25 | public function restore(int $targetServerId = null) |
||
26 | { |
||
27 | $command = new RestoreBackupCommand(); |
||
28 | |||
29 | if (is_null($targetServerId)) { |
||
30 | return $command; |
||
31 | } |
||
32 | |||
33 | return $command->targeting($targetServerId); |
||
34 | } |
||
35 | |||
36 | public function enable() |
||
39 | } |
||
40 | |||
41 | public function cancel() |
||
42 | { |
||
43 | return new CancelBackupsCommand(); |
||
44 | } |
||
45 | |||
46 | public function disable() |
||
49 | } |
||
50 | } |
||
51 |