function TextDescriptor::getColumnWidth
Parameters
array<Command|string> $commands:
1 call to TextDescriptor::getColumnWidth()
- TextDescriptor::describeApplication in vendor/
symfony/ console/ Descriptor/ TextDescriptor.php - Describes an Application instance.
File
-
vendor/
symfony/ console/ Descriptor/ TextDescriptor.php, line 277
Class
- TextDescriptor
- Text descriptor.
Namespace
Symfony\Component\Console\DescriptorCode
private function getColumnWidth(array $commands) : int {
$widths = [];
foreach ($commands as $command) {
if ($command instanceof Command) {
$widths[] = Helper::width($command->getName());
foreach ($command->getAliases() as $alias) {
$widths[] = Helper::width($alias);
}
}
else {
$widths[] = Helper::width($command);
}
}
return $widths ? max($widths) + 2 : 0;
}