Changed double-quotes to single

This commit is contained in:
Roland Häder 2022-06-24 05:27:33 +02:00
parent 88870d18be
commit f689faca99
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77

View File

@ -1719,29 +1719,29 @@ class Database
*/
public function processlist(): array
{
$ret = $this->p("SHOW PROCESSLIST");
$ret = $this->p('SHOW PROCESSLIST');
$data = $this->toArray($ret);
$processes = 0;
$states = [];
foreach ($data as $process) {
$state = trim($process["State"]);
$state = trim($process['State']);
// Filter out all non blocking processes
if (!in_array($state, ["", "init", "statistics", "updating"])) {
if (!in_array($state, ['', 'init', 'statistics', 'updating'])) {
++$states[$state];
++$processes;
}
}
$statelist = "";
$statelist = '';
foreach ($states as $state => $usage) {
if ($statelist != "") {
$statelist .= ", ";
if ($statelist != '') {
$statelist .= ', ';
}
$statelist .= $state . ": " . $usage;
$statelist .= $state . ': ' . $usage;
}
return (["list" => $statelist, "amount" => $processes]);
return (['list' => $statelist, 'amount' => $processes]);
}
/**