From 5473f38805ceedf403ea1e702ef90ac6fe555685 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 11 Nov 2017 16:13:54 +0100 Subject: [PATCH] Typhints and global defs --- Stdlib/Queue/PriorityQueue.php | 4 +--- System/SystemUtils.php | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Stdlib/Queue/PriorityQueue.php b/Stdlib/Queue/PriorityQueue.php index 44d32991d..bfeddbf88 100644 --- a/Stdlib/Queue/PriorityQueue.php +++ b/Stdlib/Queue/PriorityQueue.php @@ -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); diff --git a/System/SystemUtils.php b/System/SystemUtils.php index af82bd0e7..b665200dc 100644 --- a/System/SystemUtils.php +++ b/System/SystemUtils.php @@ -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) {