Skip to content

Commit

Permalink
flarum info: Tweak output styling
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Sep 3, 2018
1 parent 7e39807 commit 092e5b9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Foundation/Console/InfoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ protected function configure()
protected function fire()
{
$coreVersion = $this->findPackageVersion(__DIR__.'/../../../', Application::VERSION);
$this->info("Flarum core $coreVersion");
$this->output->writeln("<info>Flarum core $coreVersion</info>");

$this->info('PHP '.PHP_VERSION);
$this->output->writeln('<info>PHP version:</info> '.PHP_VERSION);

$phpExtensions = implode(', ', get_loaded_extensions());
$this->info("Loaded extensions: $phpExtensions");
$this->output->writeln("<info>Loaded extensions:</info> $phpExtensions");

$table = new Table($this->output);
$table->setHeaders([
Expand All @@ -76,8 +76,7 @@ protected function fire()
]
])->setStyle(
(new TableStyle())
->setCellRowFormat('<info>%s</info>')
->setBorderFormat('<info>%s</info>')
->setCellHeaderFormat('<info>%s</info>')
);

foreach ($this->extensions->getEnabledExtensions() as $extension) {
Expand All @@ -95,9 +94,9 @@ protected function fire()

$table->render();

$this->info('Base URL: '.$this->config['url']);
$this->info('Installation path: '.getcwd());
$this->info('Debug mode '.($this->config['debug'] ? 'ON' : 'off'));
$this->output->writeln('<info>Base URL:</info> '.$this->config['url']);
$this->output->writeln('<info>Installation path:</info> '.getcwd());
$this->output->writeln('<info>Debug mode:</info> '.($this->config['debug'] ? 'ON' : 'off'));

if ($this->config['debug']) {
$this->error(
Expand Down

0 comments on commit 092e5b9

Please sign in to comment.