Skip to content

Commit

Permalink
Merge pull request #1284 from tarlepp/bug/check-dependencies-widths
Browse files Browse the repository at this point in the history
Bug/check-depencies command - Fixed column widths once again
  • Loading branch information
tarlepp committed Jun 15, 2021
2 parents 44cdb94 + f7b4d75 commit ec5db13
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 ec5db13

Please sign in to comment.