From 2a58db3ca04601eab4400d43e8514672d39239b6 Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Mon, 22 Sep 2025 16:39:01 +0200 Subject: [PATCH] refactor(admin-delegation): extract plain output to new function prepare to add json output Signed-off-by: Misha M.-Kupriyanov --- apps/settings/lib/Command/AdminDelegation/Show.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/settings/lib/Command/AdminDelegation/Show.php b/apps/settings/lib/Command/AdminDelegation/Show.php index 6925f43fad1..3399acc5944 100644 --- a/apps/settings/lib/Command/AdminDelegation/Show.php +++ b/apps/settings/lib/Command/AdminDelegation/Show.php @@ -34,6 +34,16 @@ class Show extends Base { protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); + + $this->outputPlainFormat($io); + + return 0; + } + + /** + * Output data in plain table format + */ + private function outputPlainFormat(SymfonyStyle $io): void { $io->title('Current delegations'); $sections = $this->settingManager->getAdminSections(); @@ -62,8 +72,6 @@ class Show extends Base { }, $sectionSettings)); } } - - return 0; } /**