setName('info:storages') ->setDescription('List storages ordered by the number of files') ->addOption('count', 'c', InputOption::VALUE_REQUIRED, 'Number of storages to display', 25) ->addOption('all', 'a', InputOption::VALUE_NONE, 'Display all storages'); } public function execute(InputInterface $input, OutputInterface $output): int { $count = (int)$input->getOption('count'); $all = $input->getOption('all'); $limit = $all ? null : $count; $storages = $this->fileUtils->listStorages($limit); $this->writeStreamingTableInOutputFormat($input, $output, $this->fileUtils->formatStorages($storages), 100); return 0; } }