AAPanelSystem::Size()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace DevOpsSantana\AAPanel;
4
5
/**
6
 * Class AAPanelSystem
7
 * @package DevOpsSantana\AAPanel
8
 * @author Rogério Santana <https://github.com/devopssantana>
9
 * @since : 2022
10
 */
11
class AAPanelSystem extends AAPanelConnect
12
{
13
    public function __construct()
14
    {
15
        parent::__construct();
16
    }
17
18
    public function Info()
19
    {
20
        $url = $this->serverUrl . '/system?action=GetSystemTotal';
21
22
        return (parent::Execute($url, $this->data));
23
    }
24
25
    public function Disk()
26
    {
27
        $url = $this->serverUrl . '/system?action=GetDiskInfo';
28
29
        return (parent::Execute($url, $this->data));
30
    }
31
32
    public function Network()
33
    {
34
        $url = $this->serverUrl . '/system?action=GetNetWork';
35
36
        return (parent::Execute($url, $this->data));
37
    }
38
39
    public function Size(string $path = '/www/wwwroot/'): mixed
40
    {
41
        $url = $this->serverUrl . '/files?action=GetDirSize';
42
43
        $this->data['path']   = $path;
44
45
        return (parent::Execute($url, $this->data));
46
    }
47
}
48