Skip to content

Commit

Permalink
Bug/check-depencies command - Fixed column widths once again
Browse files Browse the repository at this point in the history
  • Loading branch information
tarlepp committed Jun 15, 2021
1 parent 44cdb94 commit f7b4d75
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/Command/Utils/CheckDependencies.php
Expand Up @@ -98,11 +98,19 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$table->setHeaders($headers);
$table->setRows($rows);
$table->setStyle($style);
$table->setColumnWidth(0, 23);
$table->setColumnWidth(1, $packageNameLength);
$table->setColumnWidth(2, 95 - $packageNameLength);
$table->setColumnWidth(3, 10);
$table->setColumnWidth(4, 11);

$widths = [
23,
$packageNameLength,
95 - $packageNameLength,
10,
11,
];

foreach ($widths as $columnIndex => $width) {
$table->setColumnWidth($columnIndex, $width);
$table->setColumnMaxWidth($columnIndex, $width);
}

count($rows)
? $table->render()
Expand Down

0 comments on commit f7b4d75

Please sign in to comment.