diff --git a/src/Illuminate/Database/Console/ShowCommand.php b/src/Illuminate/Database/Console/ShowCommand.php index 0637dd37f5e5..0741beb48dc2 100644 --- a/src/Illuminate/Database/Console/ShowCommand.php +++ b/src/Illuminate/Database/Console/ShowCommand.php @@ -162,7 +162,7 @@ protected function displayForCli(array $data) $this->newLine(); $this->components->twoColumnDetail(''.$platform['name'].'', $platform['version']); - $this->components->twoColumnDetail('Connection', Arr::get($platform['config'], 'connection')); + $this->components->twoColumnDetail('Connection', $platform['connection']); $this->components->twoColumnDetail('Database', Arr::get($platform['config'], 'database')); $this->components->twoColumnDetail('Host', Arr::get($platform['config'], 'host')); $this->components->twoColumnDetail('Port', Arr::get($platform['config'], 'port')); @@ -186,13 +186,11 @@ protected function displayForCli(array $data) ); $tables->each(function ($table) { - if ($tableSize = $table['size']) { - $tableSize = Number::fileSize($tableSize, 2); - } + $tableSize = is_null($table['size']) ? null : Number::fileSize($table['size'], 2); $this->components->twoColumnDetail( ($table['schema'] ? $table['schema'].' / ' : '').$table['table'].($this->output->isVerbose() ? ' '.$table['engine'].'' : null), - ($tableSize ?: '—').($this->option('counts') ? ' / '.Number::format($table['rows']).'' : '') + ($tableSize ?? '—').($this->option('counts') ? ' / '.Number::format($table['rows']).'' : '') ); if ($this->output->isVerbose()) {