* table formatting

This commit is contained in:
Danyi Dávid 2019-05-21 21:01:32 +02:00
parent 1225f8f391
commit 631aa12a59

View File

@ -39,14 +39,16 @@ class PendingCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)
{ {
$pendingImports = $this->smsStoreService->getFailedImports(); $pendingImports = $this->smsStoreService->getFailedImports();
$output->writeln("<info>Pengind SMS:</info>");
$section = $output->section(); $section = $output->section();
$table = new Table($section); $table = new Table($section);
$table->setHeaderTitle("<info>Pengind SMS:</info>");
$table->setHeaders([ $table->setHeaders([
'Id', 'Id',
'Text', 'Text',
'Date', 'Date',
]); ]);
$table->setColumnMaxWidth(1, 80);
$table->setColumnMaxWidth(2, 18);
/** @var Sms $sms */ /** @var Sms $sms */
foreach ($pendingImports as $sms) { foreach ($pendingImports as $sms) {
$table->addRow([ $table->addRow([