public function setColumnMaxWidth(int $columnIndex, int $width): self
    {
        if (!$this->output->getFormatter() instanceof WrappableOutputFormatterInterface) {
            throw new \LogicException(sprintf('Setting a maximum column width is only supported when using a "%s" formatter, got "%s".', WrappableOutputFormatterInterface::class, \get_class($this->output->getFormatter())));
        }

        $this->columnMaxWidths[$columnIndex] = $width;

        return $this;
    }
public function setColumnMaxWidth(int $columnIndex, int $width): self
    {
        if (!$this->output->getFormatter() instanceof WrappableOutputFormatterInterface) {
            throw new \LogicException(sprintf('Setting a maximum column width is only supported when using a "%s" formatter, got "%s".', WrappableOutputFormatterInterface::class, \get_class($this->output->getFormatter())));
        }

        $this->columnMaxWidths[$columnIndex] = $width;

        return $this;
    }
public function setColumnMaxWidth ( int $ columnIndex , int $ width ) : self { if ( ! $ this -> output -> getFormatter ( ) instanceof WrappableOutputFormatterInterface ) { throw new \ LogicException ( sprintf ( 'Setting a maximum column width is only supported when using a "%s" formatter, got "%s".' , WrappableOutputFormatterInterface :: class , \ get_class ( $ this -> output -> getFormatter ( ) ) ) ) ; } $ this -> columnMaxWidths [ $ columnIndex ] = $ width ; return $ this ; }
Sets the maximum width of a column.

Any cell within this column which contents exceeds the specified width will be wrapped into multiple lines, while
formatted strings are preserved.

@return $this
Sets the maximum width of a column .