mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
various: code style
This commit is contained in:
parent
f77e9433d0
commit
e30bafc62e
@ -21,7 +21,7 @@ class HousekeepingCommand extends Command
|
|||||||
|
|
||||||
$len = array_reduce(
|
$len = array_reduce(
|
||||||
$tasks,
|
$tasks,
|
||||||
function($max, $task) {
|
function ($max, $task) {
|
||||||
return max(
|
return max(
|
||||||
$max,
|
$max,
|
||||||
strlen($task->title) + strlen($task->name) + 3
|
strlen($task->title) + strlen($task->name) + 3
|
||||||
@ -31,8 +31,8 @@ class HousekeepingCommand extends Command
|
|||||||
|
|
||||||
if (count($tasks)) {
|
if (count($tasks)) {
|
||||||
print "\n";
|
print "\n";
|
||||||
printf(" %-" . $len . "s | %s\n", 'Housekeeping task (name)', 'Count');
|
printf(" %-" . $len . "s | %s\n", 'Housekeeping task (name)', 'Count');
|
||||||
printf("-%-" . $len . "s-|-------\n", str_repeat('-', $len));
|
printf("-%-" . $len . "s-|-------\n", str_repeat('-', $len));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($tasks as $task) {
|
foreach ($tasks as $task) {
|
||||||
|
@ -942,7 +942,12 @@ abstract class DbObject
|
|||||||
//return false;
|
//return false;
|
||||||
$class = get_called_class();
|
$class = get_called_class();
|
||||||
if (! array_key_exists($class, self::$prefetchStats)) {
|
if (! array_key_exists($class, self::$prefetchStats)) {
|
||||||
self::$prefetchStats[$class] = (object) array('miss' => 0, 'hits' => 0, 'hitNames' => 0, 'combinedMiss' => 0);
|
self::$prefetchStats[$class] = (object) array(
|
||||||
|
'miss' => 0,
|
||||||
|
'hits' => 0,
|
||||||
|
'hitNames' => 0,
|
||||||
|
'combinedMiss' => 0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($key)) {
|
if (is_array($key)) {
|
||||||
|
@ -58,7 +58,7 @@ class Housekeeping
|
|||||||
{
|
{
|
||||||
return array_filter(
|
return array_filter(
|
||||||
$this->getTaskSummary(),
|
$this->getTaskSummary(),
|
||||||
function($task) {
|
function ($task) {
|
||||||
return $task->count > 0;
|
return $task->count > 0;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user