Split a method

This commit is contained in:
Fabien Potencier 2020-04-12 11:15:20 +02:00
parent d00b5b5e08
commit 55fef914cc

View File

@ -81,13 +81,17 @@ class Cursor
/**
* Clears all the output from the current line.
*/
public function clearLine(bool $fromCurrentPosition = false)
public function clearLine()
{
if (true === $fromCurrentPosition) {
$this->output->write("\x1b[K");
} else {
$this->output->write("\x1b[2K");
}
$this->output->write("\x1b[2K");
}
/**
* Clears all the output from the current line after the current position.
*/
public function clearLineAfter()
{
$this->output->write("\x1b[K");
}
/**