smsStoreService = $smsStoreService; parent::__construct(); } protected function configure() { $this->setName('pending:show') ->setDescription('Show failed koin import SMS entries'); } /** * @param InputInterface $input * @param OutputInterface $output * @return int|null|void */ protected function execute(InputInterface $input, OutputInterface $output) { $pendingImports = $this->smsStoreService->getFailedImports(); $section = $output->section(); $table = new Table($section); $table->setHeaderTitle("Pengind SMS:"); $table->setHeaders([ 'Id', 'Text', 'Date', ]); $table->setColumnMaxWidth(1, 80); $table->setColumnMaxWidth(2, 18); /** @var Sms $sms */ foreach ($pendingImports as $sms) { $table->addRow([ $sms->getId(), $sms->getText(), $sms->getOccuredAt()->format("Y-m-d H:i"), ]); } $table->render(); } }