*/
class Render
{
public static function torrents(array $torrents, OutputInterface $output)
{
if (empty($torrents)) {
return;
}
$output->writeln(' SEED LEECH SIZE ID NAME');
foreach ($torrents as $torrent) {
$output->writeln(sprintf(
'[%4d%6d] [%8s] %7d %s',
$torrent['seeders'],
$torrent['leechers'],
Formater::humanSize((int) $torrent['size']),
$torrent['id'],
$torrent['name']
));
}
}
}