Platformsh\Cli\Console\AdaptiveTable::getMaxContentWidth PHP Method

getMaxContentWidth() protected method

Find the maximum content width (excluding decoration) for each table row.
protected getMaxContentWidth ( integer $columnCount ) : integer
$columnCount integer The number of columns in the table.
return integer The maximum table width, minus the width taken up by decoration.
    protected function getMaxContentWidth($columnCount)
    {
        $style = $this->getStyle();
        $verticalBorderQuantity = $columnCount + 1;
        $paddingQuantity = $columnCount * 2;
        return $this->maxTableWidth - $verticalBorderQuantity * strlen($style->getVerticalBorderChar()) - $paddingQuantity * strlen($style->getPaddingChar());
    }