Typhints and global defs

This commit is contained in:
Dennis Eichhorn 2017-11-11 16:13:54 +01:00
parent 6d09524436
commit 5473f38805
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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) {