AAPanelSystem   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 11
c 1
b 0
f 0
dl 0
loc 35
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A Network() 0 5 1
A __construct() 0 3 1
A Info() 0 5 1
A Disk() 0 5 1
A Size() 0 7 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