N98\Magento\Command\Script\Repository\ListCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | null | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer | null | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $files = $this->getScripts();
        if (count($files) > 0) {
            $table = array();
            foreach ($files as $file) {
                $table[] = array(substr($file['fileinfo']->getFilename(), 0, -strlen(self::MAGERUN_EXTENSION)), $file['location'], $file['description']);
            }
        } else {
            $table = array();
        }
        if ($input->getOption('format') === null && count($table) === 0) {
            $output->writeln('<info>no script file found</info>');
        }
        $this->getHelper('table')->setHeaders(array('Script', 'Location', 'Description'))->renderByFormat($output, $table, $input->getOption('format'));
    }