original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Sets the maximum width of a column .