private getColumnWidth ( array $commands ) : integer | ||
$commands | array | |
리턴 | integer |
private function getColumnWidth(array $commands)
{
$widths = array();
foreach ($commands as $command) {
$widths[] = strlen($command->getName());
foreach ($command->getAliases() as $alias) {
$widths[] = strlen($alias);
}
}
return max($widths) + 2;
}