| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class System |
||
| 6 | { |
||
| 7 | private static ?System $instance = null; |
||
| 8 | |||
| 9 | static public function getInstance(): System |
||
| 10 | { |
||
| 11 | if (self::$instance === null) { |
||
| 12 | self::$instance = new self(); |
||
| 13 | } |
||
| 14 | |||
| 15 | return self::$instance; |
||
|
|
|||
| 16 | } |
||
| 17 | |||
| 18 | public function getDiskTotalSpace($directory): float |
||
| 19 | { |
||
| 20 | return disk_total_space($directory); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getDiskFreeSpace($directory): float |
||
| 24 | { |
||
| 25 | return disk_free_space($directory); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getLoadAverage(): array |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getEnvironmentVariable($name): string |
||
| 34 | { |
||
| 38 |