diff --git a/core/Command/SystemTag/ListCommand.php b/core/Command/SystemTag/ListCommand.php index f9d17efd51360..2dc68a0567024 100644 --- a/core/Command/SystemTag/ListCommand.php +++ b/core/Command/SystemTag/ListCommand.php @@ -23,8 +23,8 @@ namespace OC\Core\Command\SystemTag; use OC\Core\Command\Base; -use OCP\SystemTag\ISystemTagManager; use OCP\SystemTag\ISystemTag; +use OCP\SystemTag\ISystemTagManager; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -72,7 +72,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int * @param ISystemtag[] $tags * @return array */ - private function formatTags(array $tags) { + private function formatTags(array $tags): array { + $result = []; + foreach ($tags as $tag) { $result[$tag->getId()] = [ 'name' => $tag->getName(),