mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-14 02:58:40 +00:00
Typhints and global defs
This commit is contained in:
parent
6d09524436
commit
5473f38805
|
|
@ -192,11 +192,9 @@ class PriorityQueue implements \Countable, \Serializable
|
|||
*
|
||||
* @param string $data Data to unserialze
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function unserialize($data) : array
|
||||
public function unserialize($data)
|
||||
{
|
||||
$this->queue = json_decode($data);
|
||||
$this->count = count($this->queue);
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class SystemUtils
|
|||
$mem = 0;
|
||||
|
||||
if (stristr(PHP_OS, 'WIN')) {
|
||||
$mem = null;
|
||||
exec('wmic memorychip get capacity', $mem);
|
||||
|
||||
/** @var array $mem */
|
||||
|
|
@ -107,6 +108,7 @@ class SystemUtils
|
|||
$cpuusage = 0;
|
||||
|
||||
if (stristr(PHP_OS, 'WIN') !== false) {
|
||||
$cpuusage = null;
|
||||
exec('wmic cpu get LoadPercentage', $cpuusage);
|
||||
$cpuusage = $cpuusage[1];
|
||||
} elseif (stristr(PHP_OS, 'LINUX') !== false) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user