/** * @param int $width * @return MenuStyle */ public function setWidth($width) { $availableWidth = $this->terminal->getWidth() - $this->margin * 2 - $this->padding * 2; if ($width >= $availableWidth) { $width = $availableWidth; } $this->width = $width; $this->calculateContentWidth(); return $this; }
/** * @return string */ public function lineBreak() { echo $this->color->__invoke(str_repeat('─', $this->terminal->getWidth()))->yellow(); }
/** * @return string */ public function lineBreak() { return $this->style(str_repeat("─", $this->terminal->getWidth()), 'yellow'); }