@param OutputInterface $output

@return Table
352609
protected function getTable(OutputInterface $output)
    {
        $table = new Table($output);

        $leftAligned = new TableStyle();
        $leftAligned->setPadType(STR_PAD_LEFT);
        $table->setColumnStyle(0, $leftAligned);

        $rightAligned = new TableStyle();
        $rightAligned->setPadType(STR_PAD_LEFT);
        $table->setColumnStyle(2, $rightAligned);

        $table->setHeaders([
            ['Order', 'Callable', 'Priority'],
        ]);

        return $table;
    }
1326830
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('Registered version providers');
        $providers = $this->manager->getProviders();

        $table = new Table($output);
        $table->setHeaders(array('Alias', 'Class', 'Priority', 'Supported'))
            ->setStyle('borderless');

        foreach ($providers as $alias => $providerEntry) {
            /** @var $provider ProviderInterface */
            $provider = $providerEntry['provider'];
            $supported = $provider->isSupported() ? 'Yes' : 'No';
            $table->addRow(array($alias, get_class($provider), $providerEntry['priority'], $supported));
        }

        $table->render();
    }
1239096
public function setOutput(\Parable\Http\Output\OutputInterface $output)
    {
        $this->output = $output;
        $this->output->init($this);
        return $this;
    }
218661
public function execute(InputInterface $input): OutputInterface
    {
        $this->validator->validateInput($this, $input);
        $output = $this->generateOutput($input);
        $this->validator->validateOutput($this, $output);
        return $output;
    }
840161
protected function getBufferedOutput(OutputInterface $output, $verbosity = null)
    {
        $buffer = new BufferedOutput();
        $buffer->setDecorated($output->isDecorated());
        $buffer->setFormatter($output->getFormatter());
        if ($verbosity === null) {
            $buffer->setVerbosity($output->getVerbosity());
        } else {
            $buffer->setVerbosity($verbosity);
        }

        return $buffer;
    }
347975
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setInputAndOutput($input, $output);

        return $this->doExecute();
    }
533921
protected function listKnownSheets(OutputInterface $output)
    {
        $output->writeln('Please enter one of the configured Sheet names');

        $table = new Table($output);
        $table->setHeaders(['Sheet Name', 'URL']);

        foreach ($this->googleApiService->getMapping() as $mappingName => $mappingProperties) {
            if (isset($mappingProperties['url'])) {
                $table->addRow([$mappingName, $mappingProperties['url']]);
            }
        }

        $table->render();
    }
949149
protected function getCreateTable($output, $table, $tableName, $forceSave = false)
    {
        $output[] = $this->getTableVariable($table, $tableName);

        $alternatePrimaryKeys = $this->getAlternatePrimaryKeys($table);
        if (empty($alternatePrimaryKeys) || $forceSave) {
            $output[] = sprintf("%s\$table->save();", $this->ind2);
        }

        return $output;
    }
212725
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if ($input->getOption('debug')) {
            $verbosityLevelMap = [
                LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL,
                LogLevel::INFO   => OutputInterface::VERBOSITY_NORMAL,
            ];
        } else {
            $verbosityLevelMap = [];
        }
        $result = Infogreffe::search($input->getArgument('query'), new ConsoleLogger($output, $verbosityLevelMap));
        if (empty($result)) {
            $output->writeln('<error>No result :/</error>');
        } else {
            $table = new Table($output);
            if (!$input->getOption('url')) {
                $table->setHeaders(
                    [
                        'Name',
                        'SIRET',
                        'Address',
                        'Removed',
                    ]
                );
            }
            foreach ($result as $org) {
                if ($input->getOption('url')) {
                    $table->addRow([$org->getURL()]);
                } else {
                    $org->address['lines'] = implode(PHP_EOL, $org->address['lines']);
                    $rows = [
                        $org->name, $org->siret,
                        $org->address['lines'].PHP_EOL.$org->address['zipcode'].' '.$org->address['city'],
                    ];
                    if ($org->removed) {
                        $rows[] = '❌';
                    } else {
                        $rows[] = '';
                    }
                    $table->addRow($rows);
                }
            }
            $table->render();
        }
    }
1250158
public function cacheClear(InputInterface $input, OutputInterface $output)
    {
        $output->writeln(sprintf('Cache path: <info>%s</info>', __DIR__ . '/.cache'));
        $files = glob(__DIR__ . '/.cache/tables' . '/*');
        if (!empty($files)) {
            foreach ($files as $file) {
                $output->writeln('  <info>-></info> ' . $file);
                if ($input->hasParameterOption(['--clear'])) {
                    unlink($file);
                    $output->writeln(sprintf(
                        '    <info>✔</info> Table <info>"%s"</info> cache is clean <info>done.</info>',
                        pathinfo($file, PATHINFO_FILENAME)
                    ));
                }
            }
        } else {
            $output->writeln(sprintf('  <comment>!!</comment> Empty cache.'));
        }

        $files = glob(__DIR__ . '/.cache/dataset' . '/*');
        if (!empty($files)) {
            foreach ($files as $file) {
                $output->writeln('  <info>-></info> ' . $file);
                if ($input->hasParameterOption(['--clear'])) {
                    unlink($file);
                    $output->writeln(sprintf(
                        '    <info>✔</info> Table <info>"%s"</info> dataset is clean <info>done.</info>',
                        pathinfo($file, PATHINFO_FILENAME)
                    ));
                }
            }
        } else {
            $output->writeln(sprintf('  <comment>!!</comment> Empty dataset.'));
        }
    }
571362
private function createDB(OutputInterface $output)
    {
        $output->write('> Loading the schema of the DB', true);

        $arguments = [
            'command' => 'doctrine:schema:update',
            '--force' => true,
        ];

        $input = new ArrayInput($arguments);

        return $this->getApplication()->run($input);
    }
141113
public function setOutput(\Symfony\Component\Console\Output\OutputInterface $output)
    {
        $this->output = $output;
    }
910792
public function all(OutputInterface $output, array $response)
    {
        $this->printTable($output,
            ['Key', 'Name', 'Type', 'Public', 'Dependencies', 'Outdated', 'Updated At', 'Bad Licenses', 'Unknown Licenses'],
            ['ids', 'name', 'project_type', 'public', 'dep_number', 'out_number', 'updated_at', 'licenses_red', 'licenses_unknown'],
            $response,
            function ($key, $value) use ($output) {
                if ('public' === $key) {
                    return $value === 1 ? 'Yes' : 'No';
                }

                if (!in_array($key, ['out_number', 'licenses_red', 'licenses_unknown'], true)) {
                    return $value;
                }

                return $this->printBoolean($output, $value > 0 ? $value : 'No', $value, !$value, false);
            }
        );
    }
660892
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->injectOutputIntoLogger($output, $this->logger);
        $this->logger->info('Getting table metadata for database "' . $input->getArgument('database') . '".');
        $tables = $this->getTables($input);
        $outputTable = new Table($output);
        $outputTable
            ->setHeaders(array('Database', 'Rows', 'Size in ' . $input->getOption('unit')));
        foreach ($tables as $name => $table) {
            $outputTable->addRow([$name, $table['rows'], $table['size']]);
        }
        $outputTable->render();
        return 0;
    }
1369937
public function getCredentials(OutputInterface $output)
    {
        $credentials = $this->parser->getCredentials();
        if ( is_null($credentials)) {
            $this->showErrorRunLlumInitFirst($output,"Credentials");
        };
        return $credentials;
    }
529459
protected function execute(InputInterface $input, OutputInterface $output) {
		$trn_running = \Skeleton\Transaction\Transaction::get_running();
		$trn_runnable = \Skeleton\Transaction\Transaction::get_runnable();
		$trn_scheduled = \Skeleton\Transaction\Transaction::get_scheduled();

		$table = new Table($output);

		$table->setHeaders(['ID', 'Type', 'Scheduled at', '//']);

		$rows = [];

		$rows[] = [ new TableCell('Running', array('colspan' => 4)) ];
		$rows[] = new TableSeparator();
		$running_count = 0;
		foreach ($trn_running as $transaction) {
			if ($transaction->parallel == 0) {
				$rows[] = [ $transaction->id, $transaction->classname, $transaction->scheduled_at, $this->show_parallel($transaction) ];
				$running_count++;
			}
		}
		if ($running_count == 0) {
			$rows[] = [ 'FREE', 'FREE', 'FREE', 'NO' ];
			$running_count++;
		}
		foreach ($trn_running as $transaction) {
			if ($transaction->parallel == 1) {
				$rows[] = [ $transaction->id, $transaction->classname, $transaction->scheduled_at, $this->show_parallel($transaction) ];
				$running_count++;
			}
		}
		for ($i = $running_count; $i < \Skeleton\Transaction\Config::$max_processes; $i++) {
			$rows[] = [ 'FREE', 'FREE', 'FREE', '' ];
		}

		$rows[] = new TableSeparator();

		$rows[] = [ new TableCell('Ready to run', array('colspan' => 3)) ];
		$rows[] = new TableSeparator();
		foreach ($trn_runnable as $transaction) {
			$rows[] = [ $transaction->id, $transaction->classname, $transaction->scheduled_at, $this->show_parallel($transaction) ];
		}
		if (sizeof($trn_runnable) == 0) {
			$rows[] = [ '/', '/', '/', '/' ];
		}

		$rows[] = new TableSeparator();
		$rows[] = [ new TableCell('Scheduled', array('colspan' => 3)) ];
		$rows[] = new TableSeparator();
		foreach ($trn_scheduled as $transaction) {
			$rows[] = [ $transaction->id, $transaction->classname, $transaction->scheduled_at, $this->show_parallel($transaction) ];
		}
		if (sizeof($trn_scheduled) == 0) {
			$rows[] = [ '/', '/', '/', '/' ];
		}
		$table->setRows($rows);
		$table->render();

		return 0;
	}
180460
protected function clearSymfonyCache(OutputInterface $output)
    {
        $command   = $this->getApplication()->find('cache:clear');
        $arguments = [
            'command' => 'cache:clear',
        ];

        return $command->run(new ArrayInput($arguments), $output) === 0;
    }