Tweak commands
This commit is contained in:
@ -42,8 +42,14 @@ class GroupFindCommand extends Command
|
||||
foreach ($groups as $group) {
|
||||
$row = [];
|
||||
foreach ($keys as $key) {
|
||||
$row[] = isset($group[$key]) ? json_encode($group[$key]) : null;
|
||||
$row[] = isset($group[$key]) ? $group[$key] : null;
|
||||
}
|
||||
$row = array_map(fn($v) => match(true) {
|
||||
is_bool($v) => "<fg=magenta>".($v?"true":"false")."</>",
|
||||
is_int($v) => "<fg=cyan>{$v}</>",
|
||||
is_string($v) => "<fg=yellow>{$v}</>",
|
||||
default => $v,
|
||||
}, $row);
|
||||
$table->addRow($row);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user