src/TerminalObject/Basic/Table.php
protected function getColumnWidths()
    {
        $first_row = reset($this->data);

        // Create an array with the columns as keys and values of zero
        $column_widths = $this->getDefaultColumnWidths($first_row);

        foreach ($this->data as $columns) {
            foreach ($columns as $key => $column) {
                $column_widths[$key] = $this->getCellWidth($column_widths[$key], $column);
            }
        }

        return $column_widths;
    }
protected function getColumnWidths()
    {
        $first_row = reset($this->data);

        // Create an array with the columns as keys and values of zero
        $column_widths = $this->getDefaultColumnWidths($first_row);

        foreach ($this->data as $columns) {
            foreach ($columns as $key => $column) {
                $column_widths[$key] = $this->getCellWidth($column_widths[$key], $column);
            }
        }

        return $column_widths;
    }
protected function getColumnWidths ( ) { $ first_row = reset ( $ this -> data ) ; // Create an array with the columns as keys and values of zero $ column_widths = $ this -> getDefaultColumnWidths ( $ first_row ) ; foreach ( $ this -> data as $ columns ) { foreach ( $ columns as $ key => $ column ) { $ column_widths [ $ key ] = $ this -> getCellWidth ( $ column_widths [ $ key ] , $ column ) ; } } return $ column_widths ; }
Determine the width of each column

@return array
Determine the width of each column